@fullcalendar/scrollgrid 5.7.2 → 5.10.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.cjs.js +42 -39
- package/main.d.ts +4 -4
- package/main.global.js +50 -43
- package/main.global.min.js +2 -2
- package/main.js +42 -39
- package/main.js.map +1 -1
- package/package.json +5 -5
package/main.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar Scheduler v5.
|
|
2
|
+
FullCalendar Scheduler v5.10.1
|
|
3
3
|
Docs & License: https://fullcalendar.io/scheduler
|
|
4
4
|
(c) 2021 Adam Shaw
|
|
5
5
|
*/
|
|
@@ -115,36 +115,31 @@ function getScrollCanvasOrigin(scrollEl) {
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
function getScrollFromLeftEdge(el) {
|
|
118
|
-
var
|
|
119
|
-
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl?
|
|
118
|
+
var scrollLeft = el.scrollLeft;
|
|
119
|
+
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl instead?
|
|
120
120
|
if (computedStyles.direction === 'rtl') {
|
|
121
121
|
switch (getRtlScrollSystem()) {
|
|
122
122
|
case 'negative':
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
val = el.scrollWidth - el.clientWidth - val; // maxScrollDistance - val
|
|
127
|
-
break;
|
|
123
|
+
scrollLeft *= -1; // convert to 'reverse'. fall through...
|
|
124
|
+
case 'reverse': // scrollLeft is distance between scrollframe's right edge scrollcanvas's right edge
|
|
125
|
+
scrollLeft = el.scrollWidth - scrollLeft - el.clientWidth;
|
|
128
126
|
}
|
|
129
127
|
}
|
|
130
|
-
return
|
|
128
|
+
return scrollLeft;
|
|
131
129
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
*/
|
|
135
|
-
function setScrollFromStartingEdge(el, val) {
|
|
136
|
-
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl?
|
|
130
|
+
function setScrollFromLeftEdge(el, scrollLeft) {
|
|
131
|
+
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl instead?
|
|
137
132
|
if (computedStyles.direction === 'rtl') {
|
|
138
133
|
switch (getRtlScrollSystem()) {
|
|
139
|
-
case 'positive':
|
|
140
|
-
val = (el.scrollWidth - el.clientWidth) + val; // maxScrollDistance + val
|
|
141
|
-
break;
|
|
142
134
|
case 'reverse':
|
|
143
|
-
|
|
135
|
+
scrollLeft = el.scrollWidth - scrollLeft;
|
|
136
|
+
break;
|
|
137
|
+
case 'negative':
|
|
138
|
+
scrollLeft = -(el.scrollWidth - scrollLeft);
|
|
144
139
|
break;
|
|
145
140
|
}
|
|
146
141
|
}
|
|
147
|
-
el.scrollLeft =
|
|
142
|
+
el.scrollLeft = scrollLeft;
|
|
148
143
|
}
|
|
149
144
|
// Horizontal Scroll System Detection
|
|
150
145
|
// ----------------------------------------------------------------------------------------------
|
|
@@ -213,7 +208,7 @@ var StickyScrolling = /** @class */ (function () {
|
|
|
213
208
|
}
|
|
214
209
|
};
|
|
215
210
|
this.usingRelative =
|
|
216
|
-
!
|
|
211
|
+
!getStickySupported() || // IE11
|
|
217
212
|
// https://stackoverflow.com/questions/56835658/in-microsoft-edge-sticky-positioning-doesnt-work-when-combined-with-dir-rtl
|
|
218
213
|
(IS_MS_EDGE && isRtl);
|
|
219
214
|
if (this.usingRelative) {
|
|
@@ -332,18 +327,20 @@ function assignStickyPositions(els, elGeoms, viewportWidth) {
|
|
|
332
327
|
});
|
|
333
328
|
});
|
|
334
329
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
330
|
+
var _isStickySupported;
|
|
331
|
+
function getStickySupported() {
|
|
332
|
+
if (_isStickySupported == null) {
|
|
333
|
+
_isStickySupported = computeStickySupported();
|
|
334
|
+
}
|
|
335
|
+
return _isStickySupported;
|
|
336
|
+
}
|
|
337
|
+
function computeStickySupported() {
|
|
338
338
|
var el = document.createElement('div');
|
|
339
|
-
el.
|
|
339
|
+
el.style.position = 'sticky';
|
|
340
340
|
document.body.appendChild(el);
|
|
341
341
|
var val = window.getComputedStyle(el).position;
|
|
342
342
|
common.removeElement(el);
|
|
343
|
-
|
|
344
|
-
return val;
|
|
345
|
-
}
|
|
346
|
-
return null;
|
|
343
|
+
return val === 'sticky';
|
|
347
344
|
}
|
|
348
345
|
|
|
349
346
|
var ClippedScroller = /** @class */ (function (_super) {
|
|
@@ -478,7 +475,7 @@ var ScrollSyncer = /** @class */ (function () {
|
|
|
478
475
|
this.isPaused = true;
|
|
479
476
|
for (var _i = 0, _a = this.scrollListeners; _i < _a.length; _i++) {
|
|
480
477
|
var listener = _a[_i];
|
|
481
|
-
|
|
478
|
+
setScrollFromLeftEdge(listener.el, scrollLeft);
|
|
482
479
|
}
|
|
483
480
|
this.isPaused = false;
|
|
484
481
|
};
|
|
@@ -582,31 +579,33 @@ var ScrollGrid = /** @class */ (function (_super) {
|
|
|
582
579
|
var bodySectionNodes = [];
|
|
583
580
|
var footSectionNodes = [];
|
|
584
581
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {
|
|
585
|
-
headSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
582
|
+
headSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, true));
|
|
586
583
|
configI += 1;
|
|
587
584
|
}
|
|
588
585
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {
|
|
589
|
-
bodySectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
586
|
+
bodySectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, false));
|
|
590
587
|
configI += 1;
|
|
591
588
|
}
|
|
592
589
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {
|
|
593
|
-
footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
590
|
+
footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, true));
|
|
594
591
|
configI += 1;
|
|
595
592
|
}
|
|
596
593
|
var isBuggy = !common.getCanVGrowWithinCell(); // see NOTE in SimpleScrollGrid
|
|
594
|
+
var roleAttrs = { role: 'rowgroup' };
|
|
597
595
|
return common.createElement('table', {
|
|
598
596
|
ref: props.elRef,
|
|
597
|
+
role: 'grid',
|
|
599
598
|
className: classNames.join(' '),
|
|
600
|
-
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && common.createElement.apply(void 0, tslib.__spreadArray(['thead',
|
|
599
|
+
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && common.createElement.apply(void 0, tslib.__spreadArray(['thead', roleAttrs], headSectionNodes)), Boolean(!isBuggy && bodySectionNodes.length) && common.createElement.apply(void 0, tslib.__spreadArray(['tbody', roleAttrs], bodySectionNodes)), Boolean(!isBuggy && footSectionNodes.length) && common.createElement.apply(void 0, tslib.__spreadArray(['tfoot', roleAttrs], footSectionNodes)), isBuggy && common.createElement.apply(void 0, tslib.__spreadArray(tslib.__spreadArray(tslib.__spreadArray(['tbody', roleAttrs], headSectionNodes), bodySectionNodes), footSectionNodes)));
|
|
601
600
|
};
|
|
602
|
-
ScrollGrid.prototype.renderSection = function (sectionConfig, sectionIndex, colGroupStats, microColGroupNodes, sectionRowMaxHeights) {
|
|
601
|
+
ScrollGrid.prototype.renderSection = function (sectionConfig, sectionIndex, colGroupStats, microColGroupNodes, sectionRowMaxHeights, isHeader) {
|
|
603
602
|
var _this = this;
|
|
604
603
|
if ('outerContent' in sectionConfig) {
|
|
605
604
|
return (common.createElement(common.Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));
|
|
606
605
|
}
|
|
607
|
-
return (common.createElement("tr", { key: sectionConfig.key, className: common.getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map(function (chunkConfig, i) { return _this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || []); })));
|
|
606
|
+
return (common.createElement("tr", { key: sectionConfig.key, role: "presentation", className: common.getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map(function (chunkConfig, i) { return _this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || [], isHeader); })));
|
|
608
607
|
};
|
|
609
|
-
ScrollGrid.prototype.renderChunk = function (sectionConfig, sectionIndex, colGroupStat, microColGroupNode, chunkConfig, chunkIndex, rowHeights) {
|
|
608
|
+
ScrollGrid.prototype.renderChunk = function (sectionConfig, sectionIndex, colGroupStat, microColGroupNode, chunkConfig, chunkIndex, rowHeights, isHeader) {
|
|
610
609
|
if ('outerContent' in chunkConfig) {
|
|
611
610
|
return (common.createElement(common.Fragment, { key: chunkConfig.key }, chunkConfig.outerContent));
|
|
612
611
|
}
|
|
@@ -633,7 +632,7 @@ var ScrollGrid = /** @class */ (function (_super) {
|
|
|
633
632
|
syncRowHeights: Boolean(sectionConfig.syncRowHeights),
|
|
634
633
|
rowSyncHeights: rowHeights,
|
|
635
634
|
reportRowHeightChange: this.handleRowHeightChange,
|
|
636
|
-
});
|
|
635
|
+
}, isHeader);
|
|
637
636
|
var overflowX = forceXScrollbars ? (isLastSection ? 'scroll' : 'scroll-hidden') :
|
|
638
637
|
!allowXScrolling ? 'hidden' :
|
|
639
638
|
(isLastSection ? 'auto' : 'scroll-hidden');
|
|
@@ -643,7 +642,11 @@ var ScrollGrid = /** @class */ (function (_super) {
|
|
|
643
642
|
// it *could* be possible to reduce DOM wrappers by only doing a ClippedScroller when allowXScrolling or allowYScrolling,
|
|
644
643
|
// but if these values were to change, the inner components would be unmounted/remounted because of the parent change.
|
|
645
644
|
content = (common.createElement(ClippedScroller, { ref: this.clippedScrollerRefs.createRef(index), scrollerElRef: this.scrollerElRefs.createRef(index), overflowX: overflowX, overflowY: overflowY, liquid: chunkVGrow, maxHeight: sectionConfig.maxHeight }, content));
|
|
646
|
-
return
|
|
645
|
+
return common.createElement(isHeader ? 'th' : 'td', {
|
|
646
|
+
key: chunkConfig.key,
|
|
647
|
+
ref: this.chunkElRefs.createRef(index),
|
|
648
|
+
role: 'presentation',
|
|
649
|
+
}, content);
|
|
647
650
|
};
|
|
648
651
|
ScrollGrid.prototype.componentDidMount = function () {
|
|
649
652
|
this.updateScrollSyncers();
|
|
@@ -977,4 +980,4 @@ common.config.SCROLLGRID_RESIZE_INTERVAL = 500;
|
|
|
977
980
|
|
|
978
981
|
exports.ScrollGrid = ScrollGrid;
|
|
979
982
|
exports.default = main;
|
|
980
|
-
exports.
|
|
983
|
+
exports.setScrollFromLeftEdge = setScrollFromLeftEdge;
|
package/main.d.ts
CHANGED
|
@@ -42,8 +42,8 @@ declare class ScrollGrid extends BaseComponent<ScrollGridProps, ScrollGridState>
|
|
|
42
42
|
private recentSizingCnt;
|
|
43
43
|
state: ScrollGridState;
|
|
44
44
|
render(): VNode;
|
|
45
|
-
renderSection(sectionConfig: ScrollGridSectionConfig, sectionIndex: number, colGroupStats: ColGroupStat[], microColGroupNodes: VNode[], sectionRowMaxHeights: number[][][]): VNode;
|
|
46
|
-
renderChunk(sectionConfig: ScrollGridSectionConfig, sectionIndex: number, colGroupStat: ColGroupStat | undefined, microColGroupNode: VNode | undefined, chunkConfig: ScrollGridChunkConfig, chunkIndex: number, rowHeights: number[]): VNode;
|
|
45
|
+
renderSection(sectionConfig: ScrollGridSectionConfig, sectionIndex: number, colGroupStats: ColGroupStat[], microColGroupNodes: VNode[], sectionRowMaxHeights: number[][][], isHeader: boolean): VNode;
|
|
46
|
+
renderChunk(sectionConfig: ScrollGridSectionConfig, sectionIndex: number, colGroupStat: ColGroupStat | undefined, microColGroupNode: VNode | undefined, chunkConfig: ScrollGridChunkConfig, chunkIndex: number, rowHeights: number[], isHeader: boolean): VNode;
|
|
47
47
|
componentDidMount(): void;
|
|
48
48
|
componentDidUpdate(prevProps: ScrollGridProps, prevState: ScrollGridState): void;
|
|
49
49
|
componentWillUnmount(): void;
|
|
@@ -74,10 +74,10 @@ declare class ScrollGrid extends BaseComponent<ScrollGridProps, ScrollGridState>
|
|
|
74
74
|
getDims(): number[];
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
declare function
|
|
77
|
+
declare function setScrollFromLeftEdge(el: HTMLElement, scrollLeft: number): void;
|
|
78
78
|
|
|
79
79
|
declare const _default: _fullcalendar_common.PluginDef;
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
export default _default;
|
|
83
|
-
export { ScrollGrid,
|
|
83
|
+
export { ScrollGrid, setScrollFromLeftEdge };
|
package/main.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar Scheduler v5.
|
|
2
|
+
FullCalendar Scheduler v5.10.1
|
|
3
3
|
Docs & License: https://fullcalendar.io/scheduler
|
|
4
4
|
(c) 2021 Adam Shaw
|
|
5
5
|
*/
|
|
@@ -52,10 +52,14 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
52
52
|
return __assign.apply(this, arguments);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
function __spreadArray(to, from) {
|
|
56
|
-
for (var i = 0,
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
function __spreadArray(to, from, pack) {
|
|
56
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
57
|
+
if (ar || !(i in from)) {
|
|
58
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
59
|
+
ar[i] = from[i];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return to.concat(ar || from);
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
var WHEEL_EVENT_NAMES = 'wheel mousewheel DomMouseScroll MozMousePixelScroll'.split(' ');
|
|
@@ -158,36 +162,31 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
158
162
|
};
|
|
159
163
|
}
|
|
160
164
|
function getScrollFromLeftEdge(el) {
|
|
161
|
-
var
|
|
162
|
-
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl?
|
|
165
|
+
var scrollLeft = el.scrollLeft;
|
|
166
|
+
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl instead?
|
|
163
167
|
if (computedStyles.direction === 'rtl') {
|
|
164
168
|
switch (getRtlScrollSystem()) {
|
|
165
169
|
case 'negative':
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
val = el.scrollWidth - el.clientWidth - val; // maxScrollDistance - val
|
|
170
|
-
break;
|
|
170
|
+
scrollLeft *= -1; // convert to 'reverse'. fall through...
|
|
171
|
+
case 'reverse': // scrollLeft is distance between scrollframe's right edge scrollcanvas's right edge
|
|
172
|
+
scrollLeft = el.scrollWidth - scrollLeft - el.clientWidth;
|
|
171
173
|
}
|
|
172
174
|
}
|
|
173
|
-
return
|
|
175
|
+
return scrollLeft;
|
|
174
176
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*/
|
|
178
|
-
function setScrollFromStartingEdge(el, val) {
|
|
179
|
-
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl?
|
|
177
|
+
function setScrollFromLeftEdge(el, scrollLeft) {
|
|
178
|
+
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl instead?
|
|
180
179
|
if (computedStyles.direction === 'rtl') {
|
|
181
180
|
switch (getRtlScrollSystem()) {
|
|
182
|
-
case 'positive':
|
|
183
|
-
val = (el.scrollWidth - el.clientWidth) + val; // maxScrollDistance + val
|
|
184
|
-
break;
|
|
185
181
|
case 'reverse':
|
|
186
|
-
|
|
182
|
+
scrollLeft = el.scrollWidth - scrollLeft;
|
|
183
|
+
break;
|
|
184
|
+
case 'negative':
|
|
185
|
+
scrollLeft = -(el.scrollWidth - scrollLeft);
|
|
187
186
|
break;
|
|
188
187
|
}
|
|
189
188
|
}
|
|
190
|
-
el.scrollLeft =
|
|
189
|
+
el.scrollLeft = scrollLeft;
|
|
191
190
|
}
|
|
192
191
|
// Horizontal Scroll System Detection
|
|
193
192
|
// ----------------------------------------------------------------------------------------------
|
|
@@ -256,7 +255,7 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
256
255
|
}
|
|
257
256
|
};
|
|
258
257
|
this.usingRelative =
|
|
259
|
-
!
|
|
258
|
+
!getStickySupported() || // IE11
|
|
260
259
|
// https://stackoverflow.com/questions/56835658/in-microsoft-edge-sticky-positioning-doesnt-work-when-combined-with-dir-rtl
|
|
261
260
|
(IS_MS_EDGE && isRtl);
|
|
262
261
|
if (this.usingRelative) {
|
|
@@ -375,18 +374,20 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
375
374
|
});
|
|
376
375
|
});
|
|
377
376
|
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
377
|
+
var _isStickySupported;
|
|
378
|
+
function getStickySupported() {
|
|
379
|
+
if (_isStickySupported == null) {
|
|
380
|
+
_isStickySupported = computeStickySupported();
|
|
381
|
+
}
|
|
382
|
+
return _isStickySupported;
|
|
383
|
+
}
|
|
384
|
+
function computeStickySupported() {
|
|
381
385
|
var el = document.createElement('div');
|
|
382
|
-
el.
|
|
386
|
+
el.style.position = 'sticky';
|
|
383
387
|
document.body.appendChild(el);
|
|
384
388
|
var val = window.getComputedStyle(el).position;
|
|
385
389
|
common.removeElement(el);
|
|
386
|
-
|
|
387
|
-
return val;
|
|
388
|
-
}
|
|
389
|
-
return null;
|
|
390
|
+
return val === 'sticky';
|
|
390
391
|
}
|
|
391
392
|
|
|
392
393
|
var ClippedScroller = /** @class */ (function (_super) {
|
|
@@ -521,7 +522,7 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
521
522
|
this.isPaused = true;
|
|
522
523
|
for (var _i = 0, _a = this.scrollListeners; _i < _a.length; _i++) {
|
|
523
524
|
var listener = _a[_i];
|
|
524
|
-
|
|
525
|
+
setScrollFromLeftEdge(listener.el, scrollLeft);
|
|
525
526
|
}
|
|
526
527
|
this.isPaused = false;
|
|
527
528
|
};
|
|
@@ -625,31 +626,33 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
625
626
|
var bodySectionNodes = [];
|
|
626
627
|
var footSectionNodes = [];
|
|
627
628
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {
|
|
628
|
-
headSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
629
|
+
headSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, true));
|
|
629
630
|
configI += 1;
|
|
630
631
|
}
|
|
631
632
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {
|
|
632
|
-
bodySectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
633
|
+
bodySectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, false));
|
|
633
634
|
configI += 1;
|
|
634
635
|
}
|
|
635
636
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {
|
|
636
|
-
footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
637
|
+
footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, true));
|
|
637
638
|
configI += 1;
|
|
638
639
|
}
|
|
639
640
|
var isBuggy = !common.getCanVGrowWithinCell(); // see NOTE in SimpleScrollGrid
|
|
641
|
+
var roleAttrs = { role: 'rowgroup' };
|
|
640
642
|
return common.createElement('table', {
|
|
641
643
|
ref: props.elRef,
|
|
644
|
+
role: 'grid',
|
|
642
645
|
className: classNames.join(' '),
|
|
643
|
-
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && common.createElement.apply(void 0, __spreadArray(['thead',
|
|
646
|
+
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && common.createElement.apply(void 0, __spreadArray(['thead', roleAttrs], headSectionNodes)), Boolean(!isBuggy && bodySectionNodes.length) && common.createElement.apply(void 0, __spreadArray(['tbody', roleAttrs], bodySectionNodes)), Boolean(!isBuggy && footSectionNodes.length) && common.createElement.apply(void 0, __spreadArray(['tfoot', roleAttrs], footSectionNodes)), isBuggy && common.createElement.apply(void 0, __spreadArray(__spreadArray(__spreadArray(['tbody', roleAttrs], headSectionNodes), bodySectionNodes), footSectionNodes)));
|
|
644
647
|
};
|
|
645
|
-
ScrollGrid.prototype.renderSection = function (sectionConfig, sectionIndex, colGroupStats, microColGroupNodes, sectionRowMaxHeights) {
|
|
648
|
+
ScrollGrid.prototype.renderSection = function (sectionConfig, sectionIndex, colGroupStats, microColGroupNodes, sectionRowMaxHeights, isHeader) {
|
|
646
649
|
var _this = this;
|
|
647
650
|
if ('outerContent' in sectionConfig) {
|
|
648
651
|
return (common.createElement(common.Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));
|
|
649
652
|
}
|
|
650
|
-
return (common.createElement("tr", { key: sectionConfig.key, className: common.getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map(function (chunkConfig, i) { return _this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || []); })));
|
|
653
|
+
return (common.createElement("tr", { key: sectionConfig.key, role: "presentation", className: common.getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map(function (chunkConfig, i) { return _this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || [], isHeader); })));
|
|
651
654
|
};
|
|
652
|
-
ScrollGrid.prototype.renderChunk = function (sectionConfig, sectionIndex, colGroupStat, microColGroupNode, chunkConfig, chunkIndex, rowHeights) {
|
|
655
|
+
ScrollGrid.prototype.renderChunk = function (sectionConfig, sectionIndex, colGroupStat, microColGroupNode, chunkConfig, chunkIndex, rowHeights, isHeader) {
|
|
653
656
|
if ('outerContent' in chunkConfig) {
|
|
654
657
|
return (common.createElement(common.Fragment, { key: chunkConfig.key }, chunkConfig.outerContent));
|
|
655
658
|
}
|
|
@@ -676,7 +679,7 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
676
679
|
syncRowHeights: Boolean(sectionConfig.syncRowHeights),
|
|
677
680
|
rowSyncHeights: rowHeights,
|
|
678
681
|
reportRowHeightChange: this.handleRowHeightChange,
|
|
679
|
-
});
|
|
682
|
+
}, isHeader);
|
|
680
683
|
var overflowX = forceXScrollbars ? (isLastSection ? 'scroll' : 'scroll-hidden') :
|
|
681
684
|
!allowXScrolling ? 'hidden' :
|
|
682
685
|
(isLastSection ? 'auto' : 'scroll-hidden');
|
|
@@ -686,7 +689,11 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
686
689
|
// it *could* be possible to reduce DOM wrappers by only doing a ClippedScroller when allowXScrolling or allowYScrolling,
|
|
687
690
|
// but if these values were to change, the inner components would be unmounted/remounted because of the parent change.
|
|
688
691
|
content = (common.createElement(ClippedScroller, { ref: this.clippedScrollerRefs.createRef(index), scrollerElRef: this.scrollerElRefs.createRef(index), overflowX: overflowX, overflowY: overflowY, liquid: chunkVGrow, maxHeight: sectionConfig.maxHeight }, content));
|
|
689
|
-
return
|
|
692
|
+
return common.createElement(isHeader ? 'th' : 'td', {
|
|
693
|
+
key: chunkConfig.key,
|
|
694
|
+
ref: this.chunkElRefs.createRef(index),
|
|
695
|
+
role: 'presentation',
|
|
696
|
+
}, content);
|
|
690
697
|
};
|
|
691
698
|
ScrollGrid.prototype.componentDidMount = function () {
|
|
692
699
|
this.updateScrollSyncers();
|
|
@@ -1022,7 +1029,7 @@ var FullCalendarScrollGrid = (function (exports, common, premiumCommonPlugin) {
|
|
|
1022
1029
|
|
|
1023
1030
|
exports.ScrollGrid = ScrollGrid;
|
|
1024
1031
|
exports.default = plugin;
|
|
1025
|
-
exports.
|
|
1032
|
+
exports.setScrollFromLeftEdge = setScrollFromLeftEdge;
|
|
1026
1033
|
|
|
1027
1034
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1028
1035
|
|
package/main.global.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar Scheduler v5.
|
|
2
|
+
FullCalendar Scheduler v5.10.1
|
|
3
3
|
Docs & License: https://fullcalendar.io/scheduler
|
|
4
4
|
(c) 2021 Adam Shaw
|
|
5
5
|
*/
|
|
6
|
-
var FullCalendarScrollGrid=function(e,t,r){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=o(FullCalendarPremiumCommon),l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function c(e,t){for(var r=0,o=t.length,n=e.length;r<o;r++,n++)e[n]=t[r];return e}var a,h="wheel mousewheel DomMouseScroll MozMousePixelScroll".split(" "),u=function(){function e(e){var r=this;this.el=e,this.emitter=new t.Emitter,this.isScrolling=!1,this.isTouching=!1,this.isRecentlyWheeled=!1,this.isRecentlyScrolled=!1,this.wheelWaiter=new t.DelayedRunner(this._handleWheelWaited.bind(this)),this.scrollWaiter=new t.DelayedRunner(this._handleScrollWaited.bind(this)),this.handleScroll=function(){r.startScroll(),r.emitter.trigger("scroll",r.isRecentlyWheeled,r.isTouching),r.isRecentlyScrolled=!0,r.scrollWaiter.request(500)},this.handleWheel=function(){r.isRecentlyWheeled=!0,r.wheelWaiter.request(500)},this.handleTouchStart=function(){r.isTouching=!0},this.handleTouchEnd=function(){r.isTouching=!1,r.isRecentlyScrolled||r.endScroll()},e.addEventListener("scroll",this.handleScroll),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.addEventListener("touchend",this.handleTouchEnd);for(var o=0,n=h;o<n.length;o++){var l=n[o];e.addEventListener(l,this.handleWheel)}}return e.prototype.destroy=function(){var e=this.el;e.removeEventListener("scroll",this.handleScroll),e.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.removeEventListener("touchend",this.handleTouchEnd);for(var t=0,r=h;t<r.length;t++){var o=r[t];e.removeEventListener(o,this.handleWheel)}},e.prototype.startScroll=function(){this.isScrolling||(this.isScrolling=!0,this.emitter.trigger("scrollStart",this.isRecentlyWheeled,this.isTouching))},e.prototype.endScroll=function(){this.isScrolling&&(this.emitter.trigger("scrollEnd"),this.isScrolling=!1,this.isRecentlyScrolled=!0,this.isRecentlyWheeled=!1,this.scrollWaiter.clear(),this.wheelWaiter.clear())},e.prototype._handleScrollWaited=function(){this.isRecentlyScrolled=!1,this.isTouching||this.endScroll()},e.prototype._handleWheelWaited=function(){this.isRecentlyWheeled=!1},e}();function d(e){var t=e.scrollLeft;if("rtl"===window.getComputedStyle(e).direction)switch(f()){case"negative":t=e.scrollWidth-e.clientWidth+t;break;case"reverse":t=e.scrollWidth-e.clientWidth-t}return t}function p(e,t){if("rtl"===window.getComputedStyle(e).direction)switch(f()){case"positive":t=e.scrollWidth-e.clientWidth+t;break;case"reverse":t=-t}e.scrollLeft=t}function f(){return a||(a=function(){var e,r=document.createElement("div");r.style.position="absolute",r.style.top="-1000px",r.style.width="1px",r.style.height="1px",r.style.overflow="scroll",r.style.direction="rtl",r.style.fontSize="100px",r.innerHTML="A",document.body.appendChild(r),r.scrollLeft>0?e="positive":(r.scrollLeft=1,e=r.scrollLeft>0?"reverse":"negative");return t.removeElement(r),e}())}var g="undefined"!=typeof navigator&&/Edge/.test(navigator.userAgent),y=function(){function e(e,r){var o=this;this.scrollEl=e,this.isRtl=r,this.usingRelative=null,this.updateSize=function(){var e=o.scrollEl,r=t.findElements(e,".fc-sticky"),n=o.queryElGeoms(r),l=e.clientWidth,i=e.clientHeight;o.usingRelative?function(e,r,o,n,l){e.forEach((function(e,i){var s,c,a=r[i],h=a.naturalBound,u=a.parentBound,d=u.right-u.left,p=u.bottom-u.bottom;d>n||p>l?(s=o[i].left-h.left,c=o[i].top-h.top):(s="",c=""),t.applyStyle(e,{position:"relative",left:s,right:-s,top:c})}))}(r,n,o.computeElDestinations(n,l),l,i):function(e,r,o){e.forEach((function(e,n){var l,i=r[n],s=i.textAlign,c=i.elWidth,a=i.parentBound,h=a.right-a.left;l="center"===s&&h>o?(o-c)/2:"",t.applyStyle(e,{left:l,right:l,top:0})}))}(r,n,l)},this.usingRelative=!function(){var e=document.createElement("div");e.className="fc-sticky",document.body.appendChild(e);var r=window.getComputedStyle(e).position;if(t.removeElement(e),-1!==r.indexOf("sticky"))return r;return null}()||g&&r,this.usingRelative&&(this.listener=new u(e),this.listener.emitter.on("scrollEnd",this.updateSize))}return e.prototype.destroy=function(){this.listener&&this.listener.destroy()},e.prototype.queryElGeoms=function(e){for(var r=this.scrollEl,o=this.isRtl,n=function(e){var r=e.getBoundingClientRect(),o=t.computeEdges(e);return{left:r.left+o.borderLeft+o.scrollbarLeft-d(e),top:r.top+o.borderTop-e.scrollTop}}(r),l=[],i=0,s=e;i<s.length;i++){var c=s[i],a=t.translateRect(t.computeInnerRect(c.parentNode,!0,!0),-n.left,-n.top),h=c.getBoundingClientRect(),u=window.getComputedStyle(c),p=window.getComputedStyle(c.parentNode).textAlign,f=null;"start"===p?p=o?"right":"left":"end"===p&&(p=o?"left":"right"),"sticky"!==u.position&&(f=t.translateRect(h,-n.left-(parseFloat(u.left)||0),-n.top-(parseFloat(u.top)||0))),l.push({parentBound:a,naturalBound:f,elWidth:h.width,elHeight:h.height,textAlign:p})}return l},e.prototype.computeElDestinations=function(e,t){var r=this.scrollEl,o=r.scrollTop,n=d(r),l=n+t;return e.map((function(e){var t,r,i=e.elWidth,s=e.elHeight,c=e.parentBound,a=e.naturalBound;switch(e.textAlign){case"left":t=n;break;case"right":t=l-i;break;case"center":t=(n+l)/2-i/2}return t=Math.min(t,c.right-i),t=Math.max(t,c.left),r=o,r=Math.min(r,c.bottom-s),{left:t,top:r=Math.max(r,a.top)}}))},e}();var S=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.elRef=t.createRef(),r.state={xScrollbarWidth:0,yScrollbarWidth:0},r.handleScroller=function(e){r.scroller=e,t.setRef(r.props.scrollerRef,e)},r.handleSizing=function(){var e=r.props;"scroll-hidden"===e.overflowY&&r.setState({yScrollbarWidth:r.scroller.getYScrollbarWidth()}),"scroll-hidden"===e.overflowX&&r.setState({xScrollbarWidth:r.scroller.getXScrollbarWidth()})},r}return i(r,e),r.prototype.render=function(){var e=this,r=e.props,o=e.state,n=e.context.isRtl&&t.getIsRtlScrollbarOnLeft(),l=0,i=0,s=0;return"scroll-hidden"===r.overflowX&&(s=o.xScrollbarWidth),"scroll-hidden"===r.overflowY&&null!=o.yScrollbarWidth&&(n?l=o.yScrollbarWidth:i=o.yScrollbarWidth),t.createElement("div",{ref:this.elRef,className:"fc-scroller-harness"+(r.liquid?" fc-scroller-harness-liquid":"")},t.createElement(t.Scroller,{ref:this.handleScroller,elRef:this.props.scrollerElRef,overflowX:"scroll-hidden"===r.overflowX?"scroll":r.overflowX,overflowY:"scroll-hidden"===r.overflowY?"scroll":r.overflowY,overcomeLeft:l,overcomeRight:i,overcomeBottom:s,maxHeight:"number"==typeof r.maxHeight?r.maxHeight+("scroll-hidden"===r.overflowX?o.xScrollbarWidth:0):"",liquid:r.liquid,liquidIsAbsolute:!0},r.children))},r.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},r.prototype.componentDidUpdate=function(e){t.isPropsEqual(e,this.props)||this.handleSizing()},r.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},r.prototype.needsXScrolling=function(){return this.scroller.needsXScrolling()},r.prototype.needsYScrolling=function(){return this.scroller.needsYScrolling()},r}(t.BaseComponent),m=function(){function e(e,t){var r=this;this.isVertical=e,this.scrollEls=t,this.isPaused=!1,this.scrollListeners=t.map((function(e){return r.bindScroller(e)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollListeners;e<t.length;e++){t[e].destroy()}},e.prototype.bindScroller=function(e){var t=this,r=this.scrollEls,o=this.isVertical,n=new u(e);return n.emitter.on("scroll",(function(n,l){if(!t.isPaused&&((!t.masterEl||t.masterEl!==e&&(n||l))&&t.assignMaster(e),t.masterEl===e))for(var i=0,s=r;i<s.length;i++){var c=s[i];c!==e&&(o?c.scrollTop=e.scrollTop:c.scrollLeft=e.scrollLeft)}})),n.emitter.on("scrollEnd",(function(){t.masterEl===e&&(t.masterEl=null)})),n},e.prototype.assignMaster=function(e){this.masterEl=e;for(var t=0,r=this.scrollListeners;t<r.length;t++){var o=r[t];o.el!==e&&o.endScroll()}},e.prototype.forceScrollLeft=function(e){this.isPaused=!0;for(var t=0,r=this.scrollListeners;t<r.length;t++){p(r[t].el,e)}this.isPaused=!1},e.prototype.forceScrollTop=function(e){this.isPaused=!0;for(var t=0,r=this.scrollListeners;t<r.length;t++){r[t].el.scrollTop=e}this.isPaused=!1},e}(),v=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.compileColGroupStats=t.memoizeArraylike(C,k),r.renderMicroColGroups=t.memoizeArraylike(t.renderMicroColGroup),r.clippedScrollerRefs=new t.RefMap,r.scrollerElRefs=new t.RefMap(r._handleScrollerEl.bind(r)),r.chunkElRefs=new t.RefMap(r._handleChunkEl.bind(r)),r.getStickyScrolling=t.memoizeArraylike(H,null,L),r.getScrollSyncersBySection=t.memoizeHashlike(M.bind(r,!0),null,x),r.getScrollSyncersByColumn=t.memoizeHashlike(M.bind(r,!1),null,x),r.stickyScrollings=[],r.scrollSyncersBySection={},r.scrollSyncersByColumn={},r.rowUnstableMap=new Map,r.rowInnerMaxHeightMap=new Map,r.anyRowHeightsChanged=!1,r.recentSizingCnt=0,r.state={shrinkWidths:[],forceYScrollbars:!1,forceXScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{},sectionRowMaxHeights:[]},r.handleSizing=function(e,t){if(r.allowSizing()){t||(r.anyRowHeightsChanged=!0);var o={};(e||!t&&!r.rowUnstableMap.size)&&(o.sectionRowMaxHeights=r.computeSectionRowMaxHeights()),r.setState(s(s({shrinkWidths:r.computeShrinkWidths()},r.computeScrollerDims()),o),(function(){r.rowUnstableMap.size||r.updateStickyScrolling()}))}},r.handleRowHeightChange=function(e,t){var o=r,n=o.rowUnstableMap,l=o.rowInnerMaxHeightMap;if(t){n.delete(e);var i=w(e);l.has(e)&&l.get(e)===i||(l.set(e,i),r.anyRowHeightsChanged=!0),!n.size&&r.anyRowHeightsChanged&&(r.anyRowHeightsChanged=!1,r.setState({sectionRowMaxHeights:r.computeSectionRowMaxHeights()}))}else n.set(e,!0)},r}return i(r,e),r.prototype.render=function(){var e=this,r=e.props,o=e.state,n=e.context,l=o.shrinkWidths,i=this.compileColGroupStats(r.colGroups.map((function(e){return[e]}))),s=this.renderMicroColGroups(i.map((function(e,t){return[e.cols,l[t]]}))),a=t.getScrollGridClassNames(r.liquid,n),h=this.getDims();h[0],h[1];for(var u,d=r.sections,p=d.length,f=0,g=[],y=[],S=[];f<p&&"header"===(u=d[f]).type;)g.push(this.renderSection(u,f,i,s,o.sectionRowMaxHeights)),f+=1;for(;f<p&&"body"===(u=d[f]).type;)y.push(this.renderSection(u,f,i,s,o.sectionRowMaxHeights)),f+=1;for(;f<p&&"footer"===(u=d[f]).type;)S.push(this.renderSection(u,f,i,s,o.sectionRowMaxHeights)),f+=1;var m=!t.getCanVGrowWithinCell();return t.createElement("table",{ref:r.elRef,className:a.join(" ")},function(e,r){var o=e.map((function(e,o){var n=e.width;return"shrink"===n&&(n=e.totalColWidth+t.sanitizeShrinkWidth(r[o])+1),t.createElement("col",{style:{width:n}})}));return t.createElement.apply(void 0,c(["colgroup",{}],o))}(i,l),Boolean(!m&&g.length)&&t.createElement.apply(void 0,c(["thead",{}],g)),Boolean(!m&&y.length)&&t.createElement.apply(void 0,c(["tbody",{}],y)),Boolean(!m&&S.length)&&t.createElement.apply(void 0,c(["tfoot",{}],S)),m&&t.createElement.apply(void 0,c(c(c(["tbody",{}],g),y),S)))},r.prototype.renderSection=function(e,r,o,n,l){var i=this;return"outerContent"in e?t.createElement(t.Fragment,{key:e.key},e.outerContent):t.createElement("tr",{key:e.key,className:t.getSectionClassNames(e,this.props.liquid).join(" ")},e.chunks.map((function(t,s){return i.renderChunk(e,r,o[s],n[s],t,s,(l[r]||[])[s]||[])})))},r.prototype.renderChunk=function(e,r,o,n,l,i,s){if("outerContent"in l)return t.createElement(t.Fragment,{key:l.key},l.outerContent);var c=this.state,a=c.scrollerClientWidths,h=c.scrollerClientHeights,u=this.getDims(),d=u[0],p=u[1],f=r*p+i,g=i===(!this.context.isRtl||t.getIsRtlScrollbarOnLeft()?p-1:0),y=r===d-1,m=y&&c.forceXScrollbars,v=g&&c.forceYScrollbars,R=o&&o.allowXScrolling,w=t.getAllowYScrolling(this.props,e),E=t.getSectionHasLiquidHeight(this.props,e),C=e.expandRows&&E,b=o&&o.totalColMinWidth||"",W=t.renderChunkContent(e,l,{tableColGroupNode:n,tableMinWidth:b,clientWidth:void 0!==a[f]?a[f]:null,clientHeight:void 0!==h[f]?h[f]:null,expandRows:C,syncRowHeights:Boolean(e.syncRowHeights),rowSyncHeights:s,reportRowHeightChange:this.handleRowHeightChange}),k=m?y?"scroll":"scroll-hidden":R?y?"auto":"scroll-hidden":"hidden",M=v?g?"scroll":"scroll-hidden":w?g?"auto":"scroll-hidden":"hidden";return W=t.createElement(S,{ref:this.clippedScrollerRefs.createRef(f),scrollerElRef:this.scrollerElRefs.createRef(f),overflowX:k,overflowY:M,liquid:E,maxHeight:e.maxHeight},W),t.createElement("td",{key:l.key,ref:this.chunkElRefs.createRef(f)},W)},r.prototype.componentDidMount=function(){this.updateScrollSyncers(),this.handleSizing(!1),this.context.addResizeHandler(this.handleSizing)},r.prototype.componentDidUpdate=function(e,t){this.updateScrollSyncers(),this.handleSizing(!1,t.sectionRowMaxHeights!==this.state.sectionRowMaxHeights)},r.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing),this.destroyStickyScrolling(),this.destroyScrollSyncers()},r.prototype.allowSizing=function(){var e=new Date;return!this.lastSizingDate||e.valueOf()>this.lastSizingDate.valueOf()+t.config.SCROLLGRID_RESIZE_INTERVAL?(this.lastSizingDate=e,this.recentSizingCnt=0,!0):(this.recentSizingCnt+=1)<=10},r.prototype.computeShrinkWidths=function(){var e=this,r=this.compileColGroupStats(this.props.colGroups.map((function(e){return[e]}))),o=this.getDims(),n=o[0],l=o[1],i=n*l,s=[];return r.forEach((function(r,o){if(r.hasShrinkCol){var n=e.chunkElRefs.collect(o,i,l);s[o]=t.computeShrinkWidth(n)}})),s},r.prototype.computeSectionRowMaxHeights=function(){for(var e=new Map,r=this.getDims(),o=r[0],n=r[1],l=[],i=0;i<o;i+=1){var s=this.props.sections[i],c=[];if(s&&s.syncRowHeights){for(var a=[],h=0;h<n;h+=1){var u=i*n+h,d=[],p=this.chunkElRefs.currentMap[u];d=p?t.findElements(p,".fc-scrollgrid-sync-table tr").map((function(t){var r=w(t);return e.set(t,r),r})):[],a.push(d)}var f=a[0].length,g=!0;for(h=1;h<n;h+=1){if(!(s.chunks[h]&&void 0!==s.chunks[h].outerContent)&&a[h].length!==f){g=!1;break}}if(g){for(h=0;h<n;h+=1)c.push([]);for(C=0;C<f;C+=1){var y=[];for(h=0;h<n;h+=1){var S=a[h][C];null!=S&&y.push(S)}var m=Math.max.apply(Math,y);for(h=0;h<n;h+=1)c[h].push(m)}}else{for(var v=[],h=0;h<n;h+=1)v.push(R(a[h])+a[h].length);for(var E=Math.max.apply(Math,v),h=0;h<n;h+=1){var C,b=a[h].length,W=E-b,k=Math.floor(W/b),M=W-k*(b-1),x=[];for((C=0)<b&&(x.push(M),C+=1);C<b;)x.push(k),C+=1;c.push(x)}}}l.push(c)}return this.rowInnerMaxHeightMap=e,l},r.prototype.computeScrollerDims=function(){for(var e=t.getScrollbarWidths(),r=this.getDims(),o=r[0],n=r[1],l=!this.context.isRtl||t.getIsRtlScrollbarOnLeft()?n-1:0,i=o-1,s=this.clippedScrollerRefs.currentMap,c=this.scrollerElRefs.currentMap,a=!1,h=!1,u={},d={},p=0;p<o;p+=1){if((g=s[y=p*n+l])&&g.needsYScrolling()){a=!0;break}}for(var f=0;f<n;f+=1){var g;if((g=s[y=i*n+f])&&g.needsXScrolling()){h=!0;break}}for(p=0;p<o;p+=1)for(f=0;f<n;f+=1){var y,S=c[y=p*n+f];if(S){var m=S.parentNode;u[y]=Math.floor(m.getBoundingClientRect().width-(f===l&&a?e.y:0)),d[y]=Math.floor(m.getBoundingClientRect().height-(p===i&&h?e.x:0))}}return{forceYScrollbars:a,forceXScrollbars:h,scrollerClientWidths:u,scrollerClientHeights:d}},r.prototype.updateStickyScrolling=function(){var e=this.context.isRtl,t=this.scrollerElRefs.getAll().map((function(t){return[t,e]})),r=this.getStickyScrolling(t);r.forEach((function(e){return e.updateSize()})),this.stickyScrollings=r},r.prototype.destroyStickyScrolling=function(){this.stickyScrollings.forEach(L)},r.prototype.updateScrollSyncers=function(){for(var e=this.getDims(),r=e[0],o=e[1],n=r*o,l={},i={},s=this.scrollerElRefs.currentMap,c=0;c<r;c+=1){var a=c*o,h=a+o;l[c]=t.collectFromHash(s,a,h,1)}for(var u=0;u<o;u+=1)i[u]=this.scrollerElRefs.collect(u,n,o);this.scrollSyncersBySection=this.getScrollSyncersBySection(l),this.scrollSyncersByColumn=this.getScrollSyncersByColumn(i)},r.prototype.destroyScrollSyncers=function(){t.mapHash(this.scrollSyncersBySection,x),t.mapHash(this.scrollSyncersByColumn,x)},r.prototype.getChunkConfigByIndex=function(e){var t=this.getDims()[1],r=Math.floor(e/t),o=e%t,n=this.props.sections[r];return n&&n.chunks[o]},r.prototype.forceScrollLeft=function(e,t){var r=this.scrollSyncersByColumn[e];r&&r.forceScrollLeft(t)},r.prototype.forceScrollTop=function(e,t){var r=this.scrollSyncersBySection[e];r&&r.forceScrollTop(t)},r.prototype._handleChunkEl=function(e,r){var o=this.getChunkConfigByIndex(parseInt(r,10));o&&t.setRef(o.elRef,e)},r.prototype._handleScrollerEl=function(e,r){var o=this.getChunkConfigByIndex(parseInt(r,10));o&&t.setRef(o.scrollerElRef,e)},r.prototype.getDims=function(){var e=this.props.sections.length;return[e,e?this.props.sections[0].chunks.length:0]},r}(t.BaseComponent);function R(e){for(var t=0,r=0,o=e;r<o.length;r++){t+=o[r]}return t}function w(e){var r=t.findElements(e,".fc-scrollgrid-sync-inner").map(E);return r.length?Math.max.apply(Math,r):0}function E(e){return e.offsetHeight}function C(e){var r=b(e.cols,"width"),o=b(e.cols,"minWidth"),n=t.hasShrinkWidth(e.cols);return{hasShrinkCol:n,totalColWidth:r,totalColMinWidth:o,allowXScrolling:"shrink"!==e.width&&Boolean(r||o||n),cols:e.cols,width:e.width}}function b(e,t){for(var r=0,o=0,n=e;o<n.length;o++){var l=n[o],i=l[t];"number"==typeof i&&(r+=i*(l.span||1))}return r}v.addStateEquality({shrinkWidths:t.isArraysEqual,scrollerClientWidths:t.isPropsEqual,scrollerClientHeights:t.isPropsEqual});var W={cols:t.isColPropsEqual};function k(e,r){return t.compareObjs(e,r,W)}function M(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new m(e,t)}function x(e){e.destroy()}function H(e,t){return new y(e,t)}function L(e){e.destroy()}var z=t.createPlugin({deps:[n.default],scrollGridImpl:v});return t.config.SCROLLGRID_RESIZE_INTERVAL=500,t.globalPlugins.push(z),e.ScrollGrid=v,e.default=z,e.setScrollFromStartingEdge=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar);
|
|
6
|
+
var FullCalendarScrollGrid=function(e,t,r){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=o(FullCalendarPremiumCommon),l=function(e,t){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function c(e,t,r){if(r||2===arguments.length)for(var o,n=0,l=t.length;n<l;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||t)}var a,h="wheel mousewheel DomMouseScroll MozMousePixelScroll".split(" "),u=function(){function e(e){var r=this;this.el=e,this.emitter=new t.Emitter,this.isScrolling=!1,this.isTouching=!1,this.isRecentlyWheeled=!1,this.isRecentlyScrolled=!1,this.wheelWaiter=new t.DelayedRunner(this._handleWheelWaited.bind(this)),this.scrollWaiter=new t.DelayedRunner(this._handleScrollWaited.bind(this)),this.handleScroll=function(){r.startScroll(),r.emitter.trigger("scroll",r.isRecentlyWheeled,r.isTouching),r.isRecentlyScrolled=!0,r.scrollWaiter.request(500)},this.handleWheel=function(){r.isRecentlyWheeled=!0,r.wheelWaiter.request(500)},this.handleTouchStart=function(){r.isTouching=!0},this.handleTouchEnd=function(){r.isTouching=!1,r.isRecentlyScrolled||r.endScroll()},e.addEventListener("scroll",this.handleScroll),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.addEventListener("touchend",this.handleTouchEnd);for(var o=0,n=h;o<n.length;o++){var l=n[o];e.addEventListener(l,this.handleWheel)}}return e.prototype.destroy=function(){var e=this.el;e.removeEventListener("scroll",this.handleScroll),e.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.removeEventListener("touchend",this.handleTouchEnd);for(var t=0,r=h;t<r.length;t++){var o=r[t];e.removeEventListener(o,this.handleWheel)}},e.prototype.startScroll=function(){this.isScrolling||(this.isScrolling=!0,this.emitter.trigger("scrollStart",this.isRecentlyWheeled,this.isTouching))},e.prototype.endScroll=function(){this.isScrolling&&(this.emitter.trigger("scrollEnd"),this.isScrolling=!1,this.isRecentlyScrolled=!0,this.isRecentlyWheeled=!1,this.scrollWaiter.clear(),this.wheelWaiter.clear())},e.prototype._handleScrollWaited=function(){this.isRecentlyScrolled=!1,this.isTouching||this.endScroll()},e.prototype._handleWheelWaited=function(){this.isRecentlyWheeled=!1},e}();function d(e){var t=e.scrollLeft;if("rtl"===window.getComputedStyle(e).direction)switch(f()){case"negative":t*=-1;case"reverse":t=e.scrollWidth-t-e.clientWidth}return t}function p(e,t){if("rtl"===window.getComputedStyle(e).direction)switch(f()){case"reverse":t=e.scrollWidth-t;break;case"negative":t=-(e.scrollWidth-t)}e.scrollLeft=t}function f(){return a||(a=function(){var e,r=document.createElement("div");r.style.position="absolute",r.style.top="-1000px",r.style.width="1px",r.style.height="1px",r.style.overflow="scroll",r.style.direction="rtl",r.style.fontSize="100px",r.innerHTML="A",document.body.appendChild(r),r.scrollLeft>0?e="positive":(r.scrollLeft=1,e=r.scrollLeft>0?"reverse":"negative");return t.removeElement(r),e}())}var g,y="undefined"!=typeof navigator&&/Edge/.test(navigator.userAgent),S=function(){function e(e,r){var o=this;this.scrollEl=e,this.isRtl=r,this.usingRelative=null,this.updateSize=function(){var e=o.scrollEl,r=t.findElements(e,".fc-sticky"),n=o.queryElGeoms(r),l=e.clientWidth,i=e.clientHeight;o.usingRelative?function(e,r,o,n,l){e.forEach((function(e,i){var s,c,a=r[i],h=a.naturalBound,u=a.parentBound,d=u.right-u.left,p=u.bottom-u.bottom;d>n||p>l?(s=o[i].left-h.left,c=o[i].top-h.top):(s="",c=""),t.applyStyle(e,{position:"relative",left:s,right:-s,top:c})}))}(r,n,o.computeElDestinations(n,l),l,i):function(e,r,o){e.forEach((function(e,n){var l,i=r[n],s=i.textAlign,c=i.elWidth,a=i.parentBound,h=a.right-a.left;l="center"===s&&h>o?(o-c)/2:"",t.applyStyle(e,{left:l,right:l,top:0})}))}(r,n,l)},this.usingRelative=!function(){null==g&&(g=function(){var e=document.createElement("div");e.style.position="sticky",document.body.appendChild(e);var r=window.getComputedStyle(e).position;return t.removeElement(e),"sticky"===r}());return g}()||y&&r,this.usingRelative&&(this.listener=new u(e),this.listener.emitter.on("scrollEnd",this.updateSize))}return e.prototype.destroy=function(){this.listener&&this.listener.destroy()},e.prototype.queryElGeoms=function(e){for(var r=this.scrollEl,o=this.isRtl,n=function(e){var r=e.getBoundingClientRect(),o=t.computeEdges(e);return{left:r.left+o.borderLeft+o.scrollbarLeft-d(e),top:r.top+o.borderTop-e.scrollTop}}(r),l=[],i=0,s=e;i<s.length;i++){var c=s[i],a=t.translateRect(t.computeInnerRect(c.parentNode,!0,!0),-n.left,-n.top),h=c.getBoundingClientRect(),u=window.getComputedStyle(c),p=window.getComputedStyle(c.parentNode).textAlign,f=null;"start"===p?p=o?"right":"left":"end"===p&&(p=o?"left":"right"),"sticky"!==u.position&&(f=t.translateRect(h,-n.left-(parseFloat(u.left)||0),-n.top-(parseFloat(u.top)||0))),l.push({parentBound:a,naturalBound:f,elWidth:h.width,elHeight:h.height,textAlign:p})}return l},e.prototype.computeElDestinations=function(e,t){var r=this.scrollEl,o=r.scrollTop,n=d(r),l=n+t;return e.map((function(e){var t,r,i=e.elWidth,s=e.elHeight,c=e.parentBound,a=e.naturalBound;switch(e.textAlign){case"left":t=n;break;case"right":t=l-i;break;case"center":t=(n+l)/2-i/2}return t=Math.min(t,c.right-i),t=Math.max(t,c.left),r=o,r=Math.min(r,c.bottom-s),{left:t,top:r=Math.max(r,a.top)}}))},e}();var m=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.elRef=t.createRef(),r.state={xScrollbarWidth:0,yScrollbarWidth:0},r.handleScroller=function(e){r.scroller=e,t.setRef(r.props.scrollerRef,e)},r.handleSizing=function(){var e=r.props;"scroll-hidden"===e.overflowY&&r.setState({yScrollbarWidth:r.scroller.getYScrollbarWidth()}),"scroll-hidden"===e.overflowX&&r.setState({xScrollbarWidth:r.scroller.getXScrollbarWidth()})},r}return i(r,e),r.prototype.render=function(){var e=this,r=e.props,o=e.state,n=e.context.isRtl&&t.getIsRtlScrollbarOnLeft(),l=0,i=0,s=0;return"scroll-hidden"===r.overflowX&&(s=o.xScrollbarWidth),"scroll-hidden"===r.overflowY&&null!=o.yScrollbarWidth&&(n?l=o.yScrollbarWidth:i=o.yScrollbarWidth),t.createElement("div",{ref:this.elRef,className:"fc-scroller-harness"+(r.liquid?" fc-scroller-harness-liquid":"")},t.createElement(t.Scroller,{ref:this.handleScroller,elRef:this.props.scrollerElRef,overflowX:"scroll-hidden"===r.overflowX?"scroll":r.overflowX,overflowY:"scroll-hidden"===r.overflowY?"scroll":r.overflowY,overcomeLeft:l,overcomeRight:i,overcomeBottom:s,maxHeight:"number"==typeof r.maxHeight?r.maxHeight+("scroll-hidden"===r.overflowX?o.xScrollbarWidth:0):"",liquid:r.liquid,liquidIsAbsolute:!0},r.children))},r.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},r.prototype.componentDidUpdate=function(e){t.isPropsEqual(e,this.props)||this.handleSizing()},r.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},r.prototype.needsXScrolling=function(){return this.scroller.needsXScrolling()},r.prototype.needsYScrolling=function(){return this.scroller.needsYScrolling()},r}(t.BaseComponent),v=function(){function e(e,t){var r=this;this.isVertical=e,this.scrollEls=t,this.isPaused=!1,this.scrollListeners=t.map((function(e){return r.bindScroller(e)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollListeners;e<t.length;e++){t[e].destroy()}},e.prototype.bindScroller=function(e){var t=this,r=this.scrollEls,o=this.isVertical,n=new u(e);return n.emitter.on("scroll",(function(n,l){if(!t.isPaused&&((!t.masterEl||t.masterEl!==e&&(n||l))&&t.assignMaster(e),t.masterEl===e))for(var i=0,s=r;i<s.length;i++){var c=s[i];c!==e&&(o?c.scrollTop=e.scrollTop:c.scrollLeft=e.scrollLeft)}})),n.emitter.on("scrollEnd",(function(){t.masterEl===e&&(t.masterEl=null)})),n},e.prototype.assignMaster=function(e){this.masterEl=e;for(var t=0,r=this.scrollListeners;t<r.length;t++){var o=r[t];o.el!==e&&o.endScroll()}},e.prototype.forceScrollLeft=function(e){this.isPaused=!0;for(var t=0,r=this.scrollListeners;t<r.length;t++){p(r[t].el,e)}this.isPaused=!1},e.prototype.forceScrollTop=function(e){this.isPaused=!0;for(var t=0,r=this.scrollListeners;t<r.length;t++){r[t].el.scrollTop=e}this.isPaused=!1},e}(),R=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.compileColGroupStats=t.memoizeArraylike(b,M),r.renderMicroColGroups=t.memoizeArraylike(t.renderMicroColGroup),r.clippedScrollerRefs=new t.RefMap,r.scrollerElRefs=new t.RefMap(r._handleScrollerEl.bind(r)),r.chunkElRefs=new t.RefMap(r._handleChunkEl.bind(r)),r.getStickyScrolling=t.memoizeArraylike(L,null,z),r.getScrollSyncersBySection=t.memoizeHashlike(x.bind(r,!0),null,H),r.getScrollSyncersByColumn=t.memoizeHashlike(x.bind(r,!1),null,H),r.stickyScrollings=[],r.scrollSyncersBySection={},r.scrollSyncersByColumn={},r.rowUnstableMap=new Map,r.rowInnerMaxHeightMap=new Map,r.anyRowHeightsChanged=!1,r.recentSizingCnt=0,r.state={shrinkWidths:[],forceYScrollbars:!1,forceXScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{},sectionRowMaxHeights:[]},r.handleSizing=function(e,t){if(r.allowSizing()){t||(r.anyRowHeightsChanged=!0);var o={};(e||!t&&!r.rowUnstableMap.size)&&(o.sectionRowMaxHeights=r.computeSectionRowMaxHeights()),r.setState(s(s({shrinkWidths:r.computeShrinkWidths()},r.computeScrollerDims()),o),(function(){r.rowUnstableMap.size||r.updateStickyScrolling()}))}},r.handleRowHeightChange=function(e,t){var o=r,n=o.rowUnstableMap,l=o.rowInnerMaxHeightMap;if(t){n.delete(e);var i=E(e);l.has(e)&&l.get(e)===i||(l.set(e,i),r.anyRowHeightsChanged=!0),!n.size&&r.anyRowHeightsChanged&&(r.anyRowHeightsChanged=!1,r.setState({sectionRowMaxHeights:r.computeSectionRowMaxHeights()}))}else n.set(e,!0)},r}return i(r,e),r.prototype.render=function(){var e=this,r=e.props,o=e.state,n=e.context,l=o.shrinkWidths,i=this.compileColGroupStats(r.colGroups.map((function(e){return[e]}))),s=this.renderMicroColGroups(i.map((function(e,t){return[e.cols,l[t]]}))),a=t.getScrollGridClassNames(r.liquid,n),h=this.getDims();h[0],h[1];for(var u,d=r.sections,p=d.length,f=0,g=[],y=[],S=[];f<p&&"header"===(u=d[f]).type;)g.push(this.renderSection(u,f,i,s,o.sectionRowMaxHeights,!0)),f+=1;for(;f<p&&"body"===(u=d[f]).type;)y.push(this.renderSection(u,f,i,s,o.sectionRowMaxHeights,!1)),f+=1;for(;f<p&&"footer"===(u=d[f]).type;)S.push(this.renderSection(u,f,i,s,o.sectionRowMaxHeights,!0)),f+=1;var m=!t.getCanVGrowWithinCell(),v={role:"rowgroup"};return t.createElement("table",{ref:r.elRef,role:"grid",className:a.join(" ")},function(e,r){var o=e.map((function(e,o){var n=e.width;return"shrink"===n&&(n=e.totalColWidth+t.sanitizeShrinkWidth(r[o])+1),t.createElement("col",{style:{width:n}})}));return t.createElement.apply(void 0,c(["colgroup",{}],o))}(i,l),Boolean(!m&&g.length)&&t.createElement.apply(void 0,c(["thead",v],g)),Boolean(!m&&y.length)&&t.createElement.apply(void 0,c(["tbody",v],y)),Boolean(!m&&S.length)&&t.createElement.apply(void 0,c(["tfoot",v],S)),m&&t.createElement.apply(void 0,c(c(c(["tbody",v],g),y),S)))},r.prototype.renderSection=function(e,r,o,n,l,i){var s=this;return"outerContent"in e?t.createElement(t.Fragment,{key:e.key},e.outerContent):t.createElement("tr",{key:e.key,role:"presentation",className:t.getSectionClassNames(e,this.props.liquid).join(" ")},e.chunks.map((function(t,c){return s.renderChunk(e,r,o[c],n[c],t,c,(l[r]||[])[c]||[],i)})))},r.prototype.renderChunk=function(e,r,o,n,l,i,s,c){if("outerContent"in l)return t.createElement(t.Fragment,{key:l.key},l.outerContent);var a=this.state,h=a.scrollerClientWidths,u=a.scrollerClientHeights,d=this.getDims(),p=d[0],f=d[1],g=r*f+i,y=i===(!this.context.isRtl||t.getIsRtlScrollbarOnLeft()?f-1:0),S=r===p-1,v=S&&a.forceXScrollbars,R=y&&a.forceYScrollbars,w=o&&o.allowXScrolling,E=t.getAllowYScrolling(this.props,e),C=t.getSectionHasLiquidHeight(this.props,e),b=e.expandRows&&C,W=o&&o.totalColMinWidth||"",k=t.renderChunkContent(e,l,{tableColGroupNode:n,tableMinWidth:W,clientWidth:void 0!==h[g]?h[g]:null,clientHeight:void 0!==u[g]?u[g]:null,expandRows:b,syncRowHeights:Boolean(e.syncRowHeights),rowSyncHeights:s,reportRowHeightChange:this.handleRowHeightChange},c),M=v?S?"scroll":"scroll-hidden":w?S?"auto":"scroll-hidden":"hidden",x=R?y?"scroll":"scroll-hidden":E?y?"auto":"scroll-hidden":"hidden";return k=t.createElement(m,{ref:this.clippedScrollerRefs.createRef(g),scrollerElRef:this.scrollerElRefs.createRef(g),overflowX:M,overflowY:x,liquid:C,maxHeight:e.maxHeight},k),t.createElement(c?"th":"td",{key:l.key,ref:this.chunkElRefs.createRef(g),role:"presentation"},k)},r.prototype.componentDidMount=function(){this.updateScrollSyncers(),this.handleSizing(!1),this.context.addResizeHandler(this.handleSizing)},r.prototype.componentDidUpdate=function(e,t){this.updateScrollSyncers(),this.handleSizing(!1,t.sectionRowMaxHeights!==this.state.sectionRowMaxHeights)},r.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing),this.destroyStickyScrolling(),this.destroyScrollSyncers()},r.prototype.allowSizing=function(){var e=new Date;return!this.lastSizingDate||e.valueOf()>this.lastSizingDate.valueOf()+t.config.SCROLLGRID_RESIZE_INTERVAL?(this.lastSizingDate=e,this.recentSizingCnt=0,!0):(this.recentSizingCnt+=1)<=10},r.prototype.computeShrinkWidths=function(){var e=this,r=this.compileColGroupStats(this.props.colGroups.map((function(e){return[e]}))),o=this.getDims(),n=o[0],l=o[1],i=n*l,s=[];return r.forEach((function(r,o){if(r.hasShrinkCol){var n=e.chunkElRefs.collect(o,i,l);s[o]=t.computeShrinkWidth(n)}})),s},r.prototype.computeSectionRowMaxHeights=function(){for(var e=new Map,r=this.getDims(),o=r[0],n=r[1],l=[],i=0;i<o;i+=1){var s=this.props.sections[i],c=[];if(s&&s.syncRowHeights){for(var a=[],h=0;h<n;h+=1){var u=i*n+h,d=[],p=this.chunkElRefs.currentMap[u];d=p?t.findElements(p,".fc-scrollgrid-sync-table tr").map((function(t){var r=E(t);return e.set(t,r),r})):[],a.push(d)}var f=a[0].length,g=!0;for(h=1;h<n;h+=1){if(!(s.chunks[h]&&void 0!==s.chunks[h].outerContent)&&a[h].length!==f){g=!1;break}}if(g){for(h=0;h<n;h+=1)c.push([]);for(C=0;C<f;C+=1){var y=[];for(h=0;h<n;h+=1){var S=a[h][C];null!=S&&y.push(S)}var m=Math.max.apply(Math,y);for(h=0;h<n;h+=1)c[h].push(m)}}else{for(var v=[],h=0;h<n;h+=1)v.push(w(a[h])+a[h].length);for(var R=Math.max.apply(Math,v),h=0;h<n;h+=1){var C,b=a[h].length,W=R-b,k=Math.floor(W/b),M=W-k*(b-1),x=[];for((C=0)<b&&(x.push(M),C+=1);C<b;)x.push(k),C+=1;c.push(x)}}}l.push(c)}return this.rowInnerMaxHeightMap=e,l},r.prototype.computeScrollerDims=function(){for(var e=t.getScrollbarWidths(),r=this.getDims(),o=r[0],n=r[1],l=!this.context.isRtl||t.getIsRtlScrollbarOnLeft()?n-1:0,i=o-1,s=this.clippedScrollerRefs.currentMap,c=this.scrollerElRefs.currentMap,a=!1,h=!1,u={},d={},p=0;p<o;p+=1){if((g=s[y=p*n+l])&&g.needsYScrolling()){a=!0;break}}for(var f=0;f<n;f+=1){var g;if((g=s[y=i*n+f])&&g.needsXScrolling()){h=!0;break}}for(p=0;p<o;p+=1)for(f=0;f<n;f+=1){var y,S=c[y=p*n+f];if(S){var m=S.parentNode;u[y]=Math.floor(m.getBoundingClientRect().width-(f===l&&a?e.y:0)),d[y]=Math.floor(m.getBoundingClientRect().height-(p===i&&h?e.x:0))}}return{forceYScrollbars:a,forceXScrollbars:h,scrollerClientWidths:u,scrollerClientHeights:d}},r.prototype.updateStickyScrolling=function(){var e=this.context.isRtl,t=this.scrollerElRefs.getAll().map((function(t){return[t,e]})),r=this.getStickyScrolling(t);r.forEach((function(e){return e.updateSize()})),this.stickyScrollings=r},r.prototype.destroyStickyScrolling=function(){this.stickyScrollings.forEach(z)},r.prototype.updateScrollSyncers=function(){for(var e=this.getDims(),r=e[0],o=e[1],n=r*o,l={},i={},s=this.scrollerElRefs.currentMap,c=0;c<r;c+=1){var a=c*o,h=a+o;l[c]=t.collectFromHash(s,a,h,1)}for(var u=0;u<o;u+=1)i[u]=this.scrollerElRefs.collect(u,n,o);this.scrollSyncersBySection=this.getScrollSyncersBySection(l),this.scrollSyncersByColumn=this.getScrollSyncersByColumn(i)},r.prototype.destroyScrollSyncers=function(){t.mapHash(this.scrollSyncersBySection,H),t.mapHash(this.scrollSyncersByColumn,H)},r.prototype.getChunkConfigByIndex=function(e){var t=this.getDims()[1],r=Math.floor(e/t),o=e%t,n=this.props.sections[r];return n&&n.chunks[o]},r.prototype.forceScrollLeft=function(e,t){var r=this.scrollSyncersByColumn[e];r&&r.forceScrollLeft(t)},r.prototype.forceScrollTop=function(e,t){var r=this.scrollSyncersBySection[e];r&&r.forceScrollTop(t)},r.prototype._handleChunkEl=function(e,r){var o=this.getChunkConfigByIndex(parseInt(r,10));o&&t.setRef(o.elRef,e)},r.prototype._handleScrollerEl=function(e,r){var o=this.getChunkConfigByIndex(parseInt(r,10));o&&t.setRef(o.scrollerElRef,e)},r.prototype.getDims=function(){var e=this.props.sections.length;return[e,e?this.props.sections[0].chunks.length:0]},r}(t.BaseComponent);function w(e){for(var t=0,r=0,o=e;r<o.length;r++){t+=o[r]}return t}function E(e){var r=t.findElements(e,".fc-scrollgrid-sync-inner").map(C);return r.length?Math.max.apply(Math,r):0}function C(e){return e.offsetHeight}function b(e){var r=W(e.cols,"width"),o=W(e.cols,"minWidth"),n=t.hasShrinkWidth(e.cols);return{hasShrinkCol:n,totalColWidth:r,totalColMinWidth:o,allowXScrolling:"shrink"!==e.width&&Boolean(r||o||n),cols:e.cols,width:e.width}}function W(e,t){for(var r=0,o=0,n=e;o<n.length;o++){var l=n[o],i=l[t];"number"==typeof i&&(r+=i*(l.span||1))}return r}R.addStateEquality({shrinkWidths:t.isArraysEqual,scrollerClientWidths:t.isPropsEqual,scrollerClientHeights:t.isPropsEqual});var k={cols:t.isColPropsEqual};function M(e,r){return t.compareObjs(e,r,k)}function x(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new v(e,t)}function H(e){e.destroy()}function L(e,t){return new S(e,t)}function z(e){e.destroy()}var B=t.createPlugin({deps:[n.default],scrollGridImpl:R});return t.config.SCROLLGRID_RESIZE_INTERVAL=500,t.globalPlugins.push(B),e.ScrollGrid=R,e.default=B,e.setScrollFromLeftEdge=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar);
|
package/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar Scheduler v5.
|
|
2
|
+
FullCalendar Scheduler v5.10.1
|
|
3
3
|
Docs & License: https://fullcalendar.io/scheduler
|
|
4
4
|
(c) 2021 Adam Shaw
|
|
5
5
|
*/
|
|
@@ -107,36 +107,31 @@ function getScrollCanvasOrigin(scrollEl) {
|
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
function getScrollFromLeftEdge(el) {
|
|
110
|
-
var
|
|
111
|
-
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl?
|
|
110
|
+
var scrollLeft = el.scrollLeft;
|
|
111
|
+
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl instead?
|
|
112
112
|
if (computedStyles.direction === 'rtl') {
|
|
113
113
|
switch (getRtlScrollSystem()) {
|
|
114
114
|
case 'negative':
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
val = el.scrollWidth - el.clientWidth - val; // maxScrollDistance - val
|
|
119
|
-
break;
|
|
115
|
+
scrollLeft *= -1; // convert to 'reverse'. fall through...
|
|
116
|
+
case 'reverse': // scrollLeft is distance between scrollframe's right edge scrollcanvas's right edge
|
|
117
|
+
scrollLeft = el.scrollWidth - scrollLeft - el.clientWidth;
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
|
-
return
|
|
120
|
+
return scrollLeft;
|
|
123
121
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
*/
|
|
127
|
-
function setScrollFromStartingEdge(el, val) {
|
|
128
|
-
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl?
|
|
122
|
+
function setScrollFromLeftEdge(el, scrollLeft) {
|
|
123
|
+
var computedStyles = window.getComputedStyle(el); // TODO: pass in isRtl instead?
|
|
129
124
|
if (computedStyles.direction === 'rtl') {
|
|
130
125
|
switch (getRtlScrollSystem()) {
|
|
131
|
-
case 'positive':
|
|
132
|
-
val = (el.scrollWidth - el.clientWidth) + val; // maxScrollDistance + val
|
|
133
|
-
break;
|
|
134
126
|
case 'reverse':
|
|
135
|
-
|
|
127
|
+
scrollLeft = el.scrollWidth - scrollLeft;
|
|
128
|
+
break;
|
|
129
|
+
case 'negative':
|
|
130
|
+
scrollLeft = -(el.scrollWidth - scrollLeft);
|
|
136
131
|
break;
|
|
137
132
|
}
|
|
138
133
|
}
|
|
139
|
-
el.scrollLeft =
|
|
134
|
+
el.scrollLeft = scrollLeft;
|
|
140
135
|
}
|
|
141
136
|
// Horizontal Scroll System Detection
|
|
142
137
|
// ----------------------------------------------------------------------------------------------
|
|
@@ -205,7 +200,7 @@ var StickyScrolling = /** @class */ (function () {
|
|
|
205
200
|
}
|
|
206
201
|
};
|
|
207
202
|
this.usingRelative =
|
|
208
|
-
!
|
|
203
|
+
!getStickySupported() || // IE11
|
|
209
204
|
// https://stackoverflow.com/questions/56835658/in-microsoft-edge-sticky-positioning-doesnt-work-when-combined-with-dir-rtl
|
|
210
205
|
(IS_MS_EDGE && isRtl);
|
|
211
206
|
if (this.usingRelative) {
|
|
@@ -324,18 +319,20 @@ function assignStickyPositions(els, elGeoms, viewportWidth) {
|
|
|
324
319
|
});
|
|
325
320
|
});
|
|
326
321
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
322
|
+
var _isStickySupported;
|
|
323
|
+
function getStickySupported() {
|
|
324
|
+
if (_isStickySupported == null) {
|
|
325
|
+
_isStickySupported = computeStickySupported();
|
|
326
|
+
}
|
|
327
|
+
return _isStickySupported;
|
|
328
|
+
}
|
|
329
|
+
function computeStickySupported() {
|
|
330
330
|
var el = document.createElement('div');
|
|
331
|
-
el.
|
|
331
|
+
el.style.position = 'sticky';
|
|
332
332
|
document.body.appendChild(el);
|
|
333
333
|
var val = window.getComputedStyle(el).position;
|
|
334
334
|
removeElement(el);
|
|
335
|
-
|
|
336
|
-
return val;
|
|
337
|
-
}
|
|
338
|
-
return null;
|
|
335
|
+
return val === 'sticky';
|
|
339
336
|
}
|
|
340
337
|
|
|
341
338
|
var ClippedScroller = /** @class */ (function (_super) {
|
|
@@ -470,7 +467,7 @@ var ScrollSyncer = /** @class */ (function () {
|
|
|
470
467
|
this.isPaused = true;
|
|
471
468
|
for (var _i = 0, _a = this.scrollListeners; _i < _a.length; _i++) {
|
|
472
469
|
var listener = _a[_i];
|
|
473
|
-
|
|
470
|
+
setScrollFromLeftEdge(listener.el, scrollLeft);
|
|
474
471
|
}
|
|
475
472
|
this.isPaused = false;
|
|
476
473
|
};
|
|
@@ -574,31 +571,33 @@ var ScrollGrid = /** @class */ (function (_super) {
|
|
|
574
571
|
var bodySectionNodes = [];
|
|
575
572
|
var footSectionNodes = [];
|
|
576
573
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {
|
|
577
|
-
headSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
574
|
+
headSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, true));
|
|
578
575
|
configI += 1;
|
|
579
576
|
}
|
|
580
577
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {
|
|
581
|
-
bodySectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
578
|
+
bodySectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, false));
|
|
582
579
|
configI += 1;
|
|
583
580
|
}
|
|
584
581
|
while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {
|
|
585
|
-
footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights));
|
|
582
|
+
footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, true));
|
|
586
583
|
configI += 1;
|
|
587
584
|
}
|
|
588
585
|
var isBuggy = !getCanVGrowWithinCell(); // see NOTE in SimpleScrollGrid
|
|
586
|
+
var roleAttrs = { role: 'rowgroup' };
|
|
589
587
|
return createElement('table', {
|
|
590
588
|
ref: props.elRef,
|
|
589
|
+
role: 'grid',
|
|
591
590
|
className: classNames.join(' '),
|
|
592
|
-
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && createElement.apply(void 0, __spreadArray(['thead',
|
|
591
|
+
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && createElement.apply(void 0, __spreadArray(['thead', roleAttrs], headSectionNodes)), Boolean(!isBuggy && bodySectionNodes.length) && createElement.apply(void 0, __spreadArray(['tbody', roleAttrs], bodySectionNodes)), Boolean(!isBuggy && footSectionNodes.length) && createElement.apply(void 0, __spreadArray(['tfoot', roleAttrs], footSectionNodes)), isBuggy && createElement.apply(void 0, __spreadArray(__spreadArray(__spreadArray(['tbody', roleAttrs], headSectionNodes), bodySectionNodes), footSectionNodes)));
|
|
593
592
|
};
|
|
594
|
-
ScrollGrid.prototype.renderSection = function (sectionConfig, sectionIndex, colGroupStats, microColGroupNodes, sectionRowMaxHeights) {
|
|
593
|
+
ScrollGrid.prototype.renderSection = function (sectionConfig, sectionIndex, colGroupStats, microColGroupNodes, sectionRowMaxHeights, isHeader) {
|
|
595
594
|
var _this = this;
|
|
596
595
|
if ('outerContent' in sectionConfig) {
|
|
597
596
|
return (createElement(Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));
|
|
598
597
|
}
|
|
599
|
-
return (createElement("tr", { key: sectionConfig.key, className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map(function (chunkConfig, i) { return _this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || []); })));
|
|
598
|
+
return (createElement("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map(function (chunkConfig, i) { return _this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || [], isHeader); })));
|
|
600
599
|
};
|
|
601
|
-
ScrollGrid.prototype.renderChunk = function (sectionConfig, sectionIndex, colGroupStat, microColGroupNode, chunkConfig, chunkIndex, rowHeights) {
|
|
600
|
+
ScrollGrid.prototype.renderChunk = function (sectionConfig, sectionIndex, colGroupStat, microColGroupNode, chunkConfig, chunkIndex, rowHeights, isHeader) {
|
|
602
601
|
if ('outerContent' in chunkConfig) {
|
|
603
602
|
return (createElement(Fragment, { key: chunkConfig.key }, chunkConfig.outerContent));
|
|
604
603
|
}
|
|
@@ -625,7 +624,7 @@ var ScrollGrid = /** @class */ (function (_super) {
|
|
|
625
624
|
syncRowHeights: Boolean(sectionConfig.syncRowHeights),
|
|
626
625
|
rowSyncHeights: rowHeights,
|
|
627
626
|
reportRowHeightChange: this.handleRowHeightChange,
|
|
628
|
-
});
|
|
627
|
+
}, isHeader);
|
|
629
628
|
var overflowX = forceXScrollbars ? (isLastSection ? 'scroll' : 'scroll-hidden') :
|
|
630
629
|
!allowXScrolling ? 'hidden' :
|
|
631
630
|
(isLastSection ? 'auto' : 'scroll-hidden');
|
|
@@ -635,7 +634,11 @@ var ScrollGrid = /** @class */ (function (_super) {
|
|
|
635
634
|
// it *could* be possible to reduce DOM wrappers by only doing a ClippedScroller when allowXScrolling or allowYScrolling,
|
|
636
635
|
// but if these values were to change, the inner components would be unmounted/remounted because of the parent change.
|
|
637
636
|
content = (createElement(ClippedScroller, { ref: this.clippedScrollerRefs.createRef(index), scrollerElRef: this.scrollerElRefs.createRef(index), overflowX: overflowX, overflowY: overflowY, liquid: chunkVGrow, maxHeight: sectionConfig.maxHeight }, content));
|
|
638
|
-
return
|
|
637
|
+
return createElement(isHeader ? 'th' : 'td', {
|
|
638
|
+
key: chunkConfig.key,
|
|
639
|
+
ref: this.chunkElRefs.createRef(index),
|
|
640
|
+
role: 'presentation',
|
|
641
|
+
}, content);
|
|
639
642
|
};
|
|
640
643
|
ScrollGrid.prototype.componentDidMount = function () {
|
|
641
644
|
this.updateScrollSyncers();
|
|
@@ -968,5 +971,5 @@ var main = createPlugin({
|
|
|
968
971
|
config.SCROLLGRID_RESIZE_INTERVAL = 500;
|
|
969
972
|
|
|
970
973
|
export default main;
|
|
971
|
-
export { ScrollGrid,
|
|
974
|
+
export { ScrollGrid, setScrollFromLeftEdge };
|
|
972
975
|
//# sourceMappingURL=main.js.map
|
package/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["src/ScrollListener.ts","src/scroll-left-norm.tsx","src/StickyScrolling.ts","src/ClippedScroller.tsx","src/ScrollSyncer.ts","src/ScrollGrid.tsx","src/main.ts"],"sourcesContent":["import { Emitter, DelayedRunner } from '@fullcalendar/common'\n\nconst WHEEL_EVENT_NAMES = 'wheel mousewheel DomMouseScroll MozMousePixelScroll'.split(' ')\n\n/*\nALSO, with the ability to disable touch\n*/\nexport class ScrollListener {\n emitter = new Emitter()\n private isScrolling = false\n private isTouching = false // user currently has finger down?\n private isRecentlyWheeled = false\n private isRecentlyScrolled = false\n private wheelWaiter = new DelayedRunner(this._handleWheelWaited.bind(this))\n private scrollWaiter = new DelayedRunner(this._handleScrollWaited.bind(this))\n\n constructor(public el: HTMLElement) {\n el.addEventListener('scroll', this.handleScroll)\n el.addEventListener('touchstart', this.handleTouchStart, { passive: true })\n el.addEventListener('touchend', this.handleTouchEnd)\n\n for (let eventName of WHEEL_EVENT_NAMES) {\n el.addEventListener(eventName, this.handleWheel)\n }\n }\n\n destroy() {\n let { el } = this\n el.removeEventListener('scroll', this.handleScroll)\n el.removeEventListener('touchstart', this.handleTouchStart, { passive: true } as AddEventListenerOptions)\n el.removeEventListener('touchend', this.handleTouchEnd)\n\n for (let eventName of WHEEL_EVENT_NAMES) {\n el.removeEventListener(eventName, this.handleWheel)\n }\n }\n\n // Start / Stop\n // ----------------------------------------------------------------------------------------------\n\n private startScroll() {\n if (!this.isScrolling) {\n this.isScrolling = true\n this.emitter.trigger('scrollStart', this.isRecentlyWheeled, this.isTouching)\n }\n }\n\n endScroll() {\n if (this.isScrolling) {\n this.emitter.trigger('scrollEnd')\n this.isScrolling = false\n this.isRecentlyScrolled = true\n this.isRecentlyWheeled = false\n this.scrollWaiter.clear()\n this.wheelWaiter.clear()\n }\n }\n\n // Handlers\n // ----------------------------------------------------------------------------------------------\n\n handleScroll = () => {\n this.startScroll()\n this.emitter.trigger('scroll', this.isRecentlyWheeled, this.isTouching)\n this.isRecentlyScrolled = true\n this.scrollWaiter.request(500)\n }\n\n _handleScrollWaited() {\n this.isRecentlyScrolled = false\n\n // only end the scroll if not currently touching.\n // if touching, the scrolling will end later, on touchend.\n if (!this.isTouching) {\n this.endScroll() // won't fire if already ended\n }\n }\n\n // will fire *before* the scroll event is fired (might not cause a scroll)\n handleWheel = () => {\n this.isRecentlyWheeled = true\n this.wheelWaiter.request(500)\n }\n\n _handleWheelWaited() {\n this.isRecentlyWheeled = false\n }\n\n // will fire *before* the scroll event is fired (might not cause a scroll)\n handleTouchStart = () => {\n this.isTouching = true\n }\n\n handleTouchEnd = () => {\n this.isTouching = false\n\n // if the user ended their touch, and the scroll area wasn't moving,\n // we consider this to be the end of the scroll.\n if (!this.isRecentlyScrolled) {\n this.endScroll() // won't fire if already ended\n }\n }\n}\n","import { removeElement, computeEdges } from '@fullcalendar/common'\n\n// TODO: assume the el has no borders?\nexport function getScrollCanvasOrigin(scrollEl: HTMLElement) { // best place for this?\n let rect = scrollEl.getBoundingClientRect()\n let edges = computeEdges(scrollEl) // TODO: pass in isRtl?\n\n return {\n left: rect.left + edges.borderLeft + edges.scrollbarLeft - getScrollFromLeftEdge(scrollEl),\n top: rect.top + edges.borderTop - scrollEl.scrollTop,\n }\n}\n\nexport function getScrollFromLeftEdge(el: HTMLElement) {\n let val = el.scrollLeft\n let computedStyles = window.getComputedStyle(el) // TODO: pass in isRtl?\n\n if (computedStyles.direction === 'rtl') {\n switch (getRtlScrollSystem()) {\n case 'negative':\n val = el.scrollWidth - el.clientWidth + val // maxScrollDistance + val\n break\n case 'reverse':\n val = el.scrollWidth - el.clientWidth - val // maxScrollDistance - val\n break\n }\n }\n\n return val\n}\n\n/*\n`val` is in the \"negative\" scheme\n*/\nexport function setScrollFromStartingEdge(el: HTMLElement, val: number) {\n let computedStyles = window.getComputedStyle(el) // TODO: pass in isRtl?\n\n if (computedStyles.direction === 'rtl') {\n switch (getRtlScrollSystem()) {\n case 'positive':\n val = (el.scrollWidth - el.clientWidth) + val // maxScrollDistance + val\n break\n case 'reverse':\n val = -val\n break\n }\n }\n\n el.scrollLeft = val\n}\n\n// Horizontal Scroll System Detection\n// ----------------------------------------------------------------------------------------------\n\nlet _rtlScrollSystem\n\nfunction getRtlScrollSystem() {\n return _rtlScrollSystem || (_rtlScrollSystem = detectRtlScrollSystem())\n}\n\nfunction detectRtlScrollSystem() {\n let el = document.createElement('div')\n el.style.position = 'absolute'\n el.style.top = '-1000px'\n el.style.width = '1px'\n el.style.height = '1px'\n el.style.overflow = 'scroll'\n el.style.direction = 'rtl'\n el.style.fontSize = '100px'\n el.innerHTML = 'A'\n\n document.body.appendChild(el)\n\n let system\n if (el.scrollLeft > 0) {\n system = 'positive' // scroll is a positive number from the left edge\n } else {\n el.scrollLeft = 1\n if (el.scrollLeft > 0) {\n system = 'reverse' // scroll is a positive number from the right edge\n } else {\n system = 'negative' // scroll is a negative number from the right edge\n }\n }\n\n removeElement(el)\n return system\n}\n","import {\n applyStyle,\n translateRect, Rect, Point,\n findElements,\n computeInnerRect,\n CssDimValue,\n removeElement,\n} from '@fullcalendar/common'\nimport { ScrollListener } from './ScrollListener'\nimport { getScrollCanvasOrigin, getScrollFromLeftEdge } from './scroll-left-norm'\n\ninterface ElementGeom {\n parentBound: Rect // relative to the canvas origin\n naturalBound: Rect | null // of the el itself\n elWidth: number\n elHeight: number\n textAlign: string\n}\n\nconst IS_MS_EDGE = typeof navigator !== 'undefined' && /Edge/.test(navigator.userAgent) // TODO: what about Chromeum-based Edge?\nconst STICKY_SELECTOR = '.fc-sticky'\n\n/*\nuseful beyond the native position:sticky for these reasons:\n- support in IE11\n- nice centering support\n\nREQUIREMENT: fc-sticky elements, if the fc-sticky className is taken away, should NOT have relative or absolute positioning.\nThis is because we attach the coords with JS, and the VDOM might take away the fc-sticky class but doesn't know kill the positioning.\n\nTODO: don't query text-align:center. isn't compatible with flexbox centering. instead, check natural X coord within parent container\n*/\nexport class StickyScrolling {\n listener?: ScrollListener\n usingRelative: boolean | null = null\n\n constructor(\n private scrollEl: HTMLElement,\n private isRtl: boolean,\n ) {\n this.usingRelative =\n !computeStickyPropVal() || // IE11\n // https://stackoverflow.com/questions/56835658/in-microsoft-edge-sticky-positioning-doesnt-work-when-combined-with-dir-rtl\n (IS_MS_EDGE && isRtl)\n\n if (this.usingRelative) {\n this.listener = new ScrollListener(scrollEl)\n this.listener.emitter.on('scrollEnd', this.updateSize)\n }\n }\n\n destroy() {\n if (this.listener) {\n this.listener.destroy()\n }\n }\n\n updateSize = () => {\n let { scrollEl } = this\n let els = findElements(scrollEl, STICKY_SELECTOR)\n let elGeoms = this.queryElGeoms(els)\n let viewportWidth = scrollEl.clientWidth\n let viewportHeight = scrollEl.clientHeight\n\n if (this.usingRelative) {\n let elDestinations = this.computeElDestinations(elGeoms, viewportWidth) // read before prepPositioning\n\n assignRelativePositions(els, elGeoms, elDestinations, viewportWidth, viewportHeight)\n } else {\n assignStickyPositions(els, elGeoms, viewportWidth)\n }\n }\n\n queryElGeoms(els: HTMLElement[]): ElementGeom[] {\n let { scrollEl, isRtl } = this\n let canvasOrigin = getScrollCanvasOrigin(scrollEl)\n let elGeoms: ElementGeom[] = []\n\n for (let el of els) {\n let parentBound = translateRect(\n computeInnerRect(el.parentNode as HTMLElement, true, true), // weird way to call this!!!\n -canvasOrigin.left,\n -canvasOrigin.top,\n )\n\n let elRect = el.getBoundingClientRect()\n let computedStyles = window.getComputedStyle(el)\n let textAlign = window.getComputedStyle(el.parentNode as HTMLElement).textAlign // ask the parent\n let naturalBound = null\n\n if (textAlign === 'start') {\n textAlign = isRtl ? 'right' : 'left'\n } else if (textAlign === 'end') {\n textAlign = isRtl ? 'left' : 'right'\n }\n\n if (computedStyles.position !== 'sticky') {\n naturalBound = translateRect(\n elRect,\n -canvasOrigin.left - (parseFloat(computedStyles.left) || 0), // could be 'auto'\n -canvasOrigin.top - (parseFloat(computedStyles.top) || 0),\n )\n }\n\n elGeoms.push({\n parentBound,\n naturalBound,\n elWidth: elRect.width,\n elHeight: elRect.height,\n textAlign,\n })\n }\n\n return elGeoms\n }\n\n // only for IE\n computeElDestinations(elGeoms: ElementGeom[], viewportWidth: number): Point[] {\n let { scrollEl } = this\n let viewportTop = scrollEl.scrollTop\n let viewportLeft = getScrollFromLeftEdge(scrollEl)\n let viewportRight = viewportLeft + viewportWidth\n\n return elGeoms.map((elGeom) => {\n let { elWidth, elHeight, parentBound, naturalBound } = elGeom\n let destLeft // relative to canvas topleft\n let destTop // \"\n\n switch (elGeom.textAlign) {\n case 'left':\n destLeft = viewportLeft\n break\n case 'right':\n destLeft = viewportRight - elWidth\n break\n case 'center':\n destLeft = (viewportLeft + viewportRight) / 2 - elWidth / 2 /// noooo, use half-width insteadddddddd\n break\n }\n\n destLeft = Math.min(destLeft, parentBound.right - elWidth)\n destLeft = Math.max(destLeft, parentBound.left)\n\n destTop = viewportTop\n destTop = Math.min(destTop, parentBound.bottom - elHeight)\n destTop = Math.max(destTop, naturalBound.top) // better to use natural top for upper bound\n\n return { left: destLeft, top: destTop }\n })\n }\n}\n\nfunction assignRelativePositions(\n els: HTMLElement[],\n elGeoms: ElementGeom[],\n elDestinations: Point[],\n viewportWidth: number,\n viewportHeight: number,\n) {\n els.forEach((el, i) => {\n let { naturalBound, parentBound } = elGeoms[i]\n let parentWidth = parentBound.right - parentBound.left\n let parentHeight = parentBound.bottom - parentBound.bottom\n let left: CssDimValue\n let top: CssDimValue\n\n if (\n parentWidth > viewportWidth ||\n parentHeight > viewportHeight\n ) {\n left = elDestinations[i].left - naturalBound.left\n top = elDestinations[i].top - naturalBound.top\n } else { // if parent container can be completely in view, we don't need stickiness\n left = ''\n top = ''\n }\n\n applyStyle(el, {\n position: 'relative',\n left,\n right: -left, // for rtl\n top,\n })\n })\n}\n\nfunction assignStickyPositions(els: HTMLElement[], elGeoms: ElementGeom[], viewportWidth: number) {\n els.forEach((el, i) => {\n let { textAlign, elWidth, parentBound } = elGeoms[i]\n let parentWidth = parentBound.right - parentBound.left\n let left: CssDimValue\n\n if (\n textAlign === 'center' &&\n parentWidth > viewportWidth\n ) {\n left = (viewportWidth - elWidth) / 2\n } else { // if parent container can be completely in view, we don't need stickiness\n left = ''\n }\n\n applyStyle(el, { // will already have fc-sticky class which makes it sticky\n left,\n right: left, // for when centered\n top: 0,\n })\n })\n}\n\n// overkill now that we use the stylesheet to set it!\n// just test that the 'position' value of a div with the fc-sticky classname has the word 'sticky' in it\nfunction computeStickyPropVal() {\n let el = document.createElement('div')\n el.className = 'fc-sticky'\n document.body.appendChild(el)\n let val = window.getComputedStyle(el).position\n removeElement(el)\n\n if (val.indexOf('sticky') !== -1) {\n return val\n }\n\n return null\n}\n","import {\n createElement, ComponentChildren, createRef, Ref, BaseComponent, setRef,\n ScrollerLike,\n Scroller, OverflowValue,\n getIsRtlScrollbarOnLeft,\n isPropsEqual,\n} from '@fullcalendar/common'\n\nexport type ClippedOverflowValue = OverflowValue | 'scroll-hidden'\n\nexport interface ClippedScrollerProps {\n overflowX: ClippedOverflowValue\n overflowY: ClippedOverflowValue\n liquid: boolean\n maxHeight?: number // incompatible with liquid\n children?: ComponentChildren\n scrollerRef?: Ref<Scroller>\n scrollerElRef?: Ref<HTMLElement>\n}\n\ninterface ClippedScrollerState {\n yScrollbarWidth?: number\n xScrollbarWidth?: number\n}\n\nexport class ClippedScroller extends BaseComponent<ClippedScrollerProps, ClippedScrollerState> implements ScrollerLike {\n private elRef = createRef<HTMLDivElement>()\n private scroller: Scroller\n\n state = {\n xScrollbarWidth: 0,\n yScrollbarWidth: 0,\n }\n\n render() {\n let { props, state, context } = this\n let isScrollbarOnLeft = context.isRtl && getIsRtlScrollbarOnLeft()\n let overcomeLeft = 0\n let overcomeRight = 0\n let overcomeBottom = 0\n\n if (props.overflowX === 'scroll-hidden') {\n overcomeBottom = state.xScrollbarWidth\n }\n\n if (props.overflowY === 'scroll-hidden') {\n if (state.yScrollbarWidth != null) {\n if (isScrollbarOnLeft) {\n overcomeLeft = state.yScrollbarWidth\n } else {\n overcomeRight = state.yScrollbarWidth\n }\n }\n }\n\n return (\n <div\n ref={this.elRef}\n className={'fc-scroller-harness' + (props.liquid ? ' fc-scroller-harness-liquid' : '')}\n >\n <Scroller\n ref={this.handleScroller}\n elRef={this.props.scrollerElRef}\n overflowX={props.overflowX === 'scroll-hidden' ? 'scroll' : props.overflowX}\n overflowY={props.overflowY === 'scroll-hidden' ? 'scroll' : props.overflowY}\n overcomeLeft={overcomeLeft}\n overcomeRight={overcomeRight}\n overcomeBottom={overcomeBottom}\n maxHeight={\n typeof props.maxHeight === 'number'\n ? (props.maxHeight + (props.overflowX === 'scroll-hidden' ? state.xScrollbarWidth : 0))\n : ''\n }\n liquid={props.liquid}\n liquidIsAbsolute\n >\n {props.children}\n </Scroller>\n </div>\n )\n }\n\n handleScroller = (scroller: Scroller) => {\n this.scroller = scroller\n setRef(this.props.scrollerRef, scroller)\n }\n\n componentDidMount() {\n this.handleSizing()\n this.context.addResizeHandler(this.handleSizing)\n }\n\n componentDidUpdate(prevProps: ClippedScrollerProps) {\n if (!isPropsEqual(prevProps, this.props)) { // an external change?\n this.handleSizing()\n }\n }\n\n componentWillUnmount() {\n this.context.removeResizeHandler(this.handleSizing)\n }\n\n handleSizing = () => {\n let { props } = this\n\n if (props.overflowY === 'scroll-hidden') {\n this.setState({ yScrollbarWidth: this.scroller.getYScrollbarWidth() })\n }\n\n if (props.overflowX === 'scroll-hidden') {\n this.setState({ xScrollbarWidth: this.scroller.getXScrollbarWidth() })\n }\n }\n\n needsXScrolling() {\n return this.scroller.needsXScrolling()\n }\n\n needsYScrolling() {\n return this.scroller.needsYScrolling()\n }\n}\n","import { ScrollListener } from './ScrollListener'\nimport { setScrollFromStartingEdge } from './scroll-left-norm'\n\nexport class ScrollSyncer {\n private masterEl: HTMLElement\n private scrollListeners: ScrollListener[]\n private isPaused: boolean = false\n\n constructor(\n private isVertical: boolean,\n private scrollEls: HTMLElement[],\n ) {\n this.scrollListeners = scrollEls.map((el) => this.bindScroller(el))\n }\n\n destroy() {\n for (let scrollListener of this.scrollListeners) {\n scrollListener.destroy()\n }\n }\n\n bindScroller(el: HTMLElement) {\n let { scrollEls, isVertical } = this\n let scrollListener = new ScrollListener(el)\n\n const onScroll = (isWheel, isTouch) => {\n if (!this.isPaused) {\n if (!this.masterEl || (this.masterEl !== el && (isWheel || isTouch))) {\n this.assignMaster(el)\n }\n\n if (this.masterEl === el) { // dealing with current\n for (let otherEl of scrollEls) {\n if (otherEl !== el) {\n if (isVertical) {\n otherEl.scrollTop = el.scrollTop\n } else {\n otherEl.scrollLeft = el.scrollLeft\n }\n }\n }\n }\n }\n }\n\n const onScrollEnd = () => {\n if (this.masterEl === el) {\n this.masterEl = null\n }\n }\n\n scrollListener.emitter.on('scroll', onScroll)\n scrollListener.emitter.on('scrollEnd', onScrollEnd)\n\n return scrollListener\n }\n\n assignMaster(el: HTMLElement) {\n this.masterEl = el\n\n for (let scrollListener of this.scrollListeners) {\n if (scrollListener.el !== el) {\n scrollListener.endScroll() // to prevent residual scrolls from reclaiming master\n }\n }\n }\n\n /*\n will normalize the scrollLeft value\n */\n forceScrollLeft(scrollLeft: number) {\n this.isPaused = true\n\n for (let listener of this.scrollListeners) {\n setScrollFromStartingEdge(listener.el, scrollLeft)\n }\n\n this.isPaused = false\n }\n\n forceScrollTop(top: number) {\n this.isPaused = true\n\n for (let listener of this.scrollListeners) {\n listener.el.scrollTop = top\n }\n\n this.isPaused = false\n }\n}\n","import {\n createElement, VNode, Fragment,\n BaseComponent,\n isArraysEqual,\n findElements,\n mapHash,\n RefMap,\n ColProps, CssDimValue, hasShrinkWidth, renderMicroColGroup,\n ScrollGridProps, ScrollGridSectionConfig, ColGroupConfig,\n getScrollGridClassNames, getSectionClassNames, getSectionHasLiquidHeight, getAllowYScrolling, renderChunkContent, computeShrinkWidth,\n getIsRtlScrollbarOnLeft,\n setRef,\n sanitizeShrinkWidth,\n isPropsEqual,\n compareObjs,\n isColPropsEqual,\n getScrollbarWidths,\n memoizeArraylike,\n collectFromHash,\n memoizeHashlike,\n ScrollGridChunkConfig,\n getCanVGrowWithinCell,\n config,\n} from '@fullcalendar/common'\nimport { StickyScrolling } from './StickyScrolling'\nimport { ClippedScroller, ClippedOverflowValue } from './ClippedScroller'\nimport { ScrollSyncer } from './ScrollSyncer'\n\ninterface ScrollGridState {\n shrinkWidths: number[] // for only one col within each vertical stack of chunks\n forceYScrollbars: boolean // null means not computed yet\n forceXScrollbars: boolean // \"\n scrollerClientWidths: { [index: string]: number } // why not use array?\n scrollerClientHeights: { [index: string]: number }\n sectionRowMaxHeights: number[][][]\n}\n\ninterface ColGroupStat {\n hasShrinkCol: boolean\n totalColWidth: number\n totalColMinWidth: number\n allowXScrolling: boolean\n width?: CssDimValue\n cols: ColProps[]\n}\n\n/*\nTODO: make <ScrollGridSection> subcomponent\nNOTE: doesn't support collapsibleWidth (which is sortof a hack anyway)\n*/\nexport class ScrollGrid extends BaseComponent<ScrollGridProps, ScrollGridState> {\n private compileColGroupStats = memoizeArraylike(compileColGroupStat, isColGroupStatsEqual)\n private renderMicroColGroups = memoizeArraylike(renderMicroColGroup) // yucky to memoize VNodes, but much more efficient for consumers\n private clippedScrollerRefs = new RefMap<ClippedScroller>()\n\n // doesn't hold non-scrolling els used just for padding\n private scrollerElRefs = new RefMap<HTMLElement>(this._handleScrollerEl.bind(this))\n\n private chunkElRefs = new RefMap<HTMLTableCellElement>(this._handleChunkEl.bind(this))\n private getStickyScrolling = memoizeArraylike(initStickyScrolling, null, destroyStickyScrolling)\n private getScrollSyncersBySection = memoizeHashlike(initScrollSyncer.bind(this, true), null, destroyScrollSyncer)\n private getScrollSyncersByColumn = memoizeHashlike(initScrollSyncer.bind(this, false), null, destroyScrollSyncer)\n private stickyScrollings: StickyScrolling[] = []\n private scrollSyncersBySection: { [sectionI: string]: ScrollSyncer } = {}\n private scrollSyncersByColumn: { [columnI: string]: ScrollSyncer } = {}\n\n // for row-height-syncing\n private rowUnstableMap = new Map<HTMLTableRowElement, boolean>() // no need to groom. always self-cancels\n private rowInnerMaxHeightMap = new Map<HTMLTableRowElement, number>()\n private anyRowHeightsChanged = false\n\n private lastSizingDate: Date\n private recentSizingCnt = 0\n\n state: ScrollGridState = {\n shrinkWidths: [],\n forceYScrollbars: false,\n forceXScrollbars: false,\n scrollerClientWidths: {},\n scrollerClientHeights: {},\n sectionRowMaxHeights: [],\n }\n\n render(): VNode {\n let { props, state, context } = this\n let { shrinkWidths } = state\n\n let colGroupStats = this.compileColGroupStats(props.colGroups.map((colGroup) => [colGroup]))\n let microColGroupNodes = this.renderMicroColGroups(colGroupStats.map((stat, i) => [stat.cols, shrinkWidths[i]]))\n let classNames = getScrollGridClassNames(props.liquid, context)\n\n // yuck\n let indices: [ number, number ][] = []\n let [sectionCnt, chunksPerSection] = this.getDims()\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n indices.push([sectionI, chunkI])\n }\n }\n\n // TODO: make DRY\n let sectionConfigs = props.sections\n let configCnt = sectionConfigs.length\n let configI = 0\n let currentConfig: ScrollGridSectionConfig\n let headSectionNodes: VNode[] = []\n let bodySectionNodes: VNode[] = []\n let footSectionNodes: VNode[] = []\n\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {\n headSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights))\n configI += 1\n }\n\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {\n bodySectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights))\n configI += 1\n }\n\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {\n footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights))\n configI += 1\n }\n\n let isBuggy = !getCanVGrowWithinCell() // see NOTE in SimpleScrollGrid\n\n return createElement(\n 'table',\n {\n ref: props.elRef,\n className: classNames.join(' '),\n },\n renderMacroColGroup(colGroupStats, shrinkWidths),\n Boolean(!isBuggy && headSectionNodes.length) && createElement('thead', {}, ...headSectionNodes),\n Boolean(!isBuggy && bodySectionNodes.length) && createElement('tbody', {}, ...bodySectionNodes),\n Boolean(!isBuggy && footSectionNodes.length) && createElement('tfoot', {}, ...footSectionNodes),\n isBuggy && createElement('tbody', {}, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes),\n )\n }\n\n renderSection(\n sectionConfig: ScrollGridSectionConfig,\n sectionIndex: number,\n colGroupStats: ColGroupStat[],\n microColGroupNodes: VNode[],\n sectionRowMaxHeights: number[][][],\n ): VNode {\n if ('outerContent' in sectionConfig) {\n return (\n <Fragment key={sectionConfig.key}>\n {sectionConfig.outerContent}\n </Fragment>\n )\n }\n\n return (\n <tr key={sectionConfig.key} className={getSectionClassNames(sectionConfig, this.props.liquid).join(' ')}>\n {sectionConfig.chunks.map((chunkConfig, i) => this.renderChunk(\n sectionConfig,\n sectionIndex,\n colGroupStats[i],\n microColGroupNodes[i],\n chunkConfig,\n i,\n (sectionRowMaxHeights[sectionIndex] || [])[i] || [],\n ))}\n </tr>\n )\n }\n\n renderChunk(\n sectionConfig: ScrollGridSectionConfig,\n sectionIndex: number,\n colGroupStat: ColGroupStat | undefined,\n microColGroupNode: VNode | undefined,\n chunkConfig: ScrollGridChunkConfig,\n chunkIndex: number,\n rowHeights: number[],\n ): VNode {\n if ('outerContent' in chunkConfig) {\n return (\n <Fragment key={chunkConfig.key}>\n {chunkConfig.outerContent}\n </Fragment>\n )\n }\n\n let { state } = this\n let { scrollerClientWidths, scrollerClientHeights } = state\n\n let [sectionCnt, chunksPerSection] = this.getDims()\n let index = sectionIndex * chunksPerSection + chunkIndex\n let sideScrollIndex = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0\n let isVScrollSide = chunkIndex === sideScrollIndex\n let isLastSection = sectionIndex === sectionCnt - 1\n\n let forceXScrollbars = isLastSection && state.forceXScrollbars // NOOOO can result in `null`\n let forceYScrollbars = isVScrollSide && state.forceYScrollbars // NOOOO can result in `null`\n\n let allowXScrolling = colGroupStat && colGroupStat.allowXScrolling // rename?\n let allowYScrolling = getAllowYScrolling(this.props, sectionConfig) // rename? do in section func?\n\n let chunkVGrow = getSectionHasLiquidHeight(this.props, sectionConfig) // do in section func?\n let expandRows = sectionConfig.expandRows && chunkVGrow\n let tableMinWidth = (colGroupStat && colGroupStat.totalColMinWidth) || ''\n\n let content = renderChunkContent(sectionConfig, chunkConfig, {\n tableColGroupNode: microColGroupNode,\n tableMinWidth,\n clientWidth: scrollerClientWidths[index] !== undefined ? scrollerClientWidths[index] : null,\n clientHeight: scrollerClientHeights[index] !== undefined ? scrollerClientHeights[index] : null,\n expandRows,\n syncRowHeights: Boolean(sectionConfig.syncRowHeights),\n rowSyncHeights: rowHeights,\n reportRowHeightChange: this.handleRowHeightChange,\n })\n\n let overflowX: ClippedOverflowValue =\n forceXScrollbars ? (isLastSection ? 'scroll' : 'scroll-hidden') :\n !allowXScrolling ? 'hidden' :\n (isLastSection ? 'auto' : 'scroll-hidden')\n\n let overflowY: ClippedOverflowValue =\n forceYScrollbars ? (isVScrollSide ? 'scroll' : 'scroll-hidden') :\n !allowYScrolling ? 'hidden' :\n (isVScrollSide ? 'auto' : 'scroll-hidden')\n\n // it *could* be possible to reduce DOM wrappers by only doing a ClippedScroller when allowXScrolling or allowYScrolling,\n // but if these values were to change, the inner components would be unmounted/remounted because of the parent change.\n content = (\n <ClippedScroller\n ref={this.clippedScrollerRefs.createRef(index)}\n scrollerElRef={this.scrollerElRefs.createRef(index)}\n overflowX={overflowX}\n overflowY={overflowY}\n liquid={chunkVGrow}\n maxHeight={sectionConfig.maxHeight}\n >\n {content}\n </ClippedScroller>\n )\n\n return (\n <td key={chunkConfig.key} ref={this.chunkElRefs.createRef(index)}>\n {content}\n </td>\n )\n }\n\n componentDidMount() {\n this.updateScrollSyncers()\n this.handleSizing(false)\n\n this.context.addResizeHandler(this.handleSizing)\n }\n\n componentDidUpdate(prevProps: ScrollGridProps, prevState: ScrollGridState) {\n this.updateScrollSyncers()\n\n // TODO: need better solution when state contains non-sizing things\n this.handleSizing(false, prevState.sectionRowMaxHeights !== this.state.sectionRowMaxHeights)\n }\n\n componentWillUnmount() {\n this.context.removeResizeHandler(this.handleSizing)\n\n this.destroyStickyScrolling()\n this.destroyScrollSyncers()\n }\n\n handleSizing = (isForcedResize: boolean, sectionRowMaxHeightsChanged?: boolean) => {\n if (!this.allowSizing()) {\n return\n }\n\n if (!sectionRowMaxHeightsChanged) { // something else changed, probably external\n this.anyRowHeightsChanged = true\n }\n\n let otherState: Partial<ScrollGridState> = {}\n\n // if reacting to self-change of sectionRowMaxHeightsChanged, or not stable, don't do anything\n if (isForcedResize || (!sectionRowMaxHeightsChanged && !this.rowUnstableMap.size)) {\n otherState.sectionRowMaxHeights = this.computeSectionRowMaxHeights()\n }\n\n this.setState({\n shrinkWidths: this.computeShrinkWidths(),\n ...this.computeScrollerDims(),\n ...(otherState as any), // wtf\n }, () => {\n if (!this.rowUnstableMap.size) {\n this.updateStickyScrolling() // needs to happen AFTER final positioning committed to DOM\n }\n })\n }\n\n allowSizing() {\n let now = new Date()\n\n if (\n !this.lastSizingDate ||\n now.valueOf() > this.lastSizingDate.valueOf() + config.SCROLLGRID_RESIZE_INTERVAL\n ) {\n this.lastSizingDate = now\n this.recentSizingCnt = 0\n return true\n }\n\n return (this.recentSizingCnt += 1) <= 10\n }\n\n handleRowHeightChange = (rowEl: HTMLTableRowElement, isStable: boolean) => {\n let { rowUnstableMap, rowInnerMaxHeightMap } = this\n\n if (!isStable) {\n rowUnstableMap.set(rowEl, true)\n } else {\n rowUnstableMap.delete(rowEl)\n\n let innerMaxHeight = getRowInnerMaxHeight(rowEl)\n if (!rowInnerMaxHeightMap.has(rowEl) || rowInnerMaxHeightMap.get(rowEl) !== innerMaxHeight) {\n rowInnerMaxHeightMap.set(rowEl, innerMaxHeight)\n this.anyRowHeightsChanged = true\n }\n\n if (!rowUnstableMap.size && this.anyRowHeightsChanged) {\n this.anyRowHeightsChanged = false\n this.setState({\n sectionRowMaxHeights: this.computeSectionRowMaxHeights(),\n })\n }\n }\n }\n\n computeShrinkWidths() {\n let colGroupStats = this.compileColGroupStats(this.props.colGroups.map((colGroup) => [colGroup]))\n let [sectionCnt, chunksPerSection] = this.getDims()\n let cnt = sectionCnt * chunksPerSection\n let shrinkWidths: number[] = []\n\n colGroupStats.forEach((colGroupStat, i) => {\n if (colGroupStat.hasShrinkCol) {\n let chunkEls = this.chunkElRefs.collect(i, cnt, chunksPerSection) // in one col\n shrinkWidths[i] = computeShrinkWidth(chunkEls)\n }\n })\n\n return shrinkWidths\n }\n\n // has the side effect of grooming rowInnerMaxHeightMap\n // TODO: somehow short-circuit if there are no new height changes\n private computeSectionRowMaxHeights() {\n let newHeightMap = new Map<HTMLTableRowElement, number>()\n\n let [sectionCnt, chunksPerSection] = this.getDims()\n let sectionRowMaxHeights: number[][][] = []\n\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n let sectionConfig = this.props.sections[sectionI]\n let assignableHeights: number[][] = [] // chunk, row\n\n if (sectionConfig && sectionConfig.syncRowHeights) {\n let rowHeightsByChunk: number[][] = []\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n let index = sectionI * chunksPerSection + chunkI\n let rowHeights: number[] = []\n\n let chunkEl = this.chunkElRefs.currentMap[index]\n if (chunkEl) {\n rowHeights = findElements(chunkEl, '.fc-scrollgrid-sync-table tr').map((rowEl: HTMLTableRowElement) => {\n let max = getRowInnerMaxHeight(rowEl)\n newHeightMap.set(rowEl, max)\n return max\n })\n } else {\n rowHeights = []\n }\n\n rowHeightsByChunk.push(rowHeights)\n }\n\n let rowCnt = rowHeightsByChunk[0].length\n let isEqualRowCnt = true\n\n for (let chunkI = 1; chunkI < chunksPerSection; chunkI += 1) {\n let isOuterContent = sectionConfig.chunks[chunkI] && sectionConfig.chunks[chunkI].outerContent !== undefined // can be null\n\n if (!isOuterContent && rowHeightsByChunk[chunkI].length !== rowCnt) { // skip outer content\n isEqualRowCnt = false\n break\n }\n }\n\n if (!isEqualRowCnt) {\n let chunkHeightSums: number[] = []\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n chunkHeightSums.push(\n sumNumbers(rowHeightsByChunk[chunkI]) + rowHeightsByChunk[chunkI].length, // add in border\n )\n }\n\n let maxTotalSum = Math.max(...chunkHeightSums)\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n let rowInChunkCnt = rowHeightsByChunk[chunkI].length\n let rowInChunkTotalHeight = maxTotalSum - rowInChunkCnt // subtract border\n\n // height of non-first row. we do this to avoid rounding, because it's unreliable within a table\n let rowInChunkHeightOthers = Math.floor(rowInChunkTotalHeight / rowInChunkCnt)\n\n // whatever is leftover goes to the first row\n let rowInChunkHeightFirst = rowInChunkTotalHeight - rowInChunkHeightOthers * (rowInChunkCnt - 1)\n\n let rowInChunkHeights: number[] = []\n let row = 0\n\n if (row < rowInChunkCnt) {\n rowInChunkHeights.push(rowInChunkHeightFirst)\n row += 1\n }\n\n while (row < rowInChunkCnt) {\n rowInChunkHeights.push(rowInChunkHeightOthers)\n row += 1\n }\n\n assignableHeights.push(rowInChunkHeights)\n }\n } else {\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n assignableHeights.push([])\n }\n\n for (let row = 0; row < rowCnt; row += 1) {\n let rowHeightsAcrossChunks: number[] = []\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n let h = rowHeightsByChunk[chunkI][row]\n if (h != null) { // protect against outerContent\n rowHeightsAcrossChunks.push(h)\n }\n }\n\n let maxHeight = Math.max(...rowHeightsAcrossChunks)\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n assignableHeights[chunkI].push(maxHeight)\n }\n }\n }\n }\n\n sectionRowMaxHeights.push(assignableHeights)\n }\n\n this.rowInnerMaxHeightMap = newHeightMap\n\n return sectionRowMaxHeights\n }\n\n computeScrollerDims() {\n let scrollbarWidth = getScrollbarWidths()\n let [sectionCnt, chunksPerSection] = this.getDims()\n let sideScrollI = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0\n let lastSectionI = sectionCnt - 1\n let currentScrollers = this.clippedScrollerRefs.currentMap\n let scrollerEls = this.scrollerElRefs.currentMap\n let forceYScrollbars = false\n let forceXScrollbars = false\n let scrollerClientWidths: { [index: string]: number } = {}\n let scrollerClientHeights: { [index: string]: number } = {}\n\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) { // along edge\n let index = sectionI * chunksPerSection + sideScrollI\n let scroller = currentScrollers[index]\n\n if (scroller && scroller.needsYScrolling()) {\n forceYScrollbars = true\n break\n }\n }\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) { // along last row\n let index = lastSectionI * chunksPerSection + chunkI\n let scroller = currentScrollers[index]\n\n if (scroller && scroller.needsXScrolling()) {\n forceXScrollbars = true\n break\n }\n }\n\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n let index = sectionI * chunksPerSection + chunkI\n let scrollerEl = scrollerEls[index]\n\n if (scrollerEl) {\n // TODO: weird way to get this. need harness b/c doesn't include table borders\n let harnessEl = scrollerEl.parentNode as HTMLElement\n\n scrollerClientWidths[index] = Math.floor(\n harnessEl.getBoundingClientRect().width - (\n (chunkI === sideScrollI && forceYScrollbars)\n ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future\n : 0\n ),\n )\n\n scrollerClientHeights[index] = Math.floor(\n harnessEl.getBoundingClientRect().height - (\n (sectionI === lastSectionI && forceXScrollbars)\n ? scrollbarWidth.x // use global because scroller might not have scrollbars yet but will need them in future\n : 0\n ),\n )\n }\n }\n }\n\n return { forceYScrollbars, forceXScrollbars, scrollerClientWidths, scrollerClientHeights }\n }\n\n updateStickyScrolling() {\n let { isRtl } = this.context\n let argsByKey = this.scrollerElRefs.getAll().map(\n (scrollEl) => [scrollEl, isRtl] as [ HTMLElement, boolean ],\n )\n\n let stickyScrollings = this.getStickyScrolling(argsByKey)\n\n stickyScrollings.forEach((stickyScrolling) => stickyScrolling.updateSize())\n\n this.stickyScrollings = stickyScrollings\n }\n\n destroyStickyScrolling() {\n this.stickyScrollings.forEach(destroyStickyScrolling)\n }\n\n updateScrollSyncers() {\n let [sectionCnt, chunksPerSection] = this.getDims()\n let cnt = sectionCnt * chunksPerSection\n let scrollElsBySection: { [sectionI: string]: HTMLElement[] } = {}\n let scrollElsByColumn: { [colI: string]: HTMLElement[] } = {}\n let scrollElMap = this.scrollerElRefs.currentMap\n\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n let startIndex = sectionI * chunksPerSection\n let endIndex = startIndex + chunksPerSection\n\n scrollElsBySection[sectionI] = collectFromHash(scrollElMap, startIndex, endIndex, 1) // use the filtered\n }\n\n for (let col = 0; col < chunksPerSection; col += 1) {\n scrollElsByColumn[col] = this.scrollerElRefs.collect(col, cnt, chunksPerSection) // DON'T use the filtered\n }\n\n this.scrollSyncersBySection = this.getScrollSyncersBySection(scrollElsBySection)\n this.scrollSyncersByColumn = this.getScrollSyncersByColumn(scrollElsByColumn)\n }\n\n destroyScrollSyncers() {\n mapHash(this.scrollSyncersBySection, destroyScrollSyncer)\n mapHash(this.scrollSyncersByColumn, destroyScrollSyncer)\n }\n\n getChunkConfigByIndex(index: number) { // somewhat expensive for something so simple\n let chunksPerSection = this.getDims()[1]\n let sectionI = Math.floor(index / chunksPerSection)\n let chunkI = index % chunksPerSection\n let sectionConfig = this.props.sections[sectionI]\n\n return sectionConfig && sectionConfig.chunks[chunkI]\n }\n\n forceScrollLeft(col: number, scrollLeft: number) {\n let scrollSyncer = this.scrollSyncersByColumn[col]\n\n if (scrollSyncer) {\n scrollSyncer.forceScrollLeft(scrollLeft)\n }\n }\n\n forceScrollTop(sectionI: number, scrollTop: number) {\n let scrollSyncer = this.scrollSyncersBySection[sectionI]\n\n if (scrollSyncer) {\n scrollSyncer.forceScrollTop(scrollTop)\n }\n }\n\n _handleChunkEl(chunkEl: HTMLTableCellElement | null, key: string) {\n let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10))\n\n if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef\n setRef(chunkConfig.elRef, chunkEl)\n }\n }\n\n _handleScrollerEl(scrollerEl: HTMLElement | null, key: string) {\n let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10))\n\n if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef\n setRef(chunkConfig.scrollerElRef, scrollerEl)\n }\n }\n\n getDims() {\n let sectionCnt = this.props.sections.length\n let chunksPerSection = sectionCnt ? this.props.sections[0].chunks.length : 0\n\n return [sectionCnt, chunksPerSection]\n }\n}\n\nScrollGrid.addStateEquality({\n shrinkWidths: isArraysEqual,\n scrollerClientWidths: isPropsEqual,\n scrollerClientHeights: isPropsEqual,\n})\n\nfunction sumNumbers(numbers: number[]) { // TODO: general util\n let sum = 0\n\n for (let n of numbers) {\n sum += n\n }\n\n return sum\n}\n\nfunction getRowInnerMaxHeight(rowEl: HTMLElement) {\n let innerHeights = findElements(rowEl, '.fc-scrollgrid-sync-inner').map(getElHeight)\n\n if (innerHeights.length) {\n return Math.max(...innerHeights)\n }\n\n return 0\n}\n\nfunction getElHeight(el: HTMLElement) {\n return el.offsetHeight // better to deal with integers, for rounding, for PureComponent\n}\n\nfunction renderMacroColGroup(colGroupStats: ColGroupStat[], shrinkWidths: number[]) {\n let children = colGroupStats.map((colGroupStat, i) => {\n let width = colGroupStat.width\n\n if (width === 'shrink') {\n width = colGroupStat.totalColWidth + sanitizeShrinkWidth(shrinkWidths[i]) + 1 // +1 for border :(\n }\n\n return ( // eslint-disable-next-line react/jsx-key\n <col style={{ width }} />\n )\n })\n\n return createElement('colgroup', {}, ...children)\n}\n\nfunction compileColGroupStat(colGroupConfig: ColGroupConfig): ColGroupStat {\n let totalColWidth = sumColProp(colGroupConfig.cols, 'width') // excludes \"shrink\"\n let totalColMinWidth = sumColProp(colGroupConfig.cols, 'minWidth')\n let hasShrinkCol = hasShrinkWidth(colGroupConfig.cols)\n let allowXScrolling = colGroupConfig.width !== 'shrink' && Boolean(totalColWidth || totalColMinWidth || hasShrinkCol)\n\n return {\n hasShrinkCol,\n totalColWidth,\n totalColMinWidth,\n allowXScrolling,\n cols: colGroupConfig.cols,\n width: colGroupConfig.width,\n }\n}\n\nfunction sumColProp(cols: ColProps[], propName: string) {\n let total = 0\n\n for (let col of cols) {\n let val = col[propName]\n\n if (typeof val === 'number') {\n total += val * (col.span || 1)\n }\n }\n\n return total\n}\n\nconst COL_GROUP_STAT_EQUALITY = {\n cols: isColPropsEqual,\n}\n\nfunction isColGroupStatsEqual(stat0: ColGroupStat, stat1: ColGroupStat): boolean {\n return compareObjs(stat0, stat1, COL_GROUP_STAT_EQUALITY)\n}\n\n// for memoizers...\n\nfunction initScrollSyncer(isVertical: boolean, ...scrollEls: HTMLElement[]) {\n return new ScrollSyncer(isVertical, scrollEls)\n}\n\nfunction destroyScrollSyncer(scrollSyncer: ScrollSyncer) {\n scrollSyncer.destroy()\n}\n\nfunction initStickyScrolling(scrollEl: HTMLElement, isRtl: boolean) {\n return new StickyScrolling(scrollEl, isRtl)\n}\n\nfunction destroyStickyScrolling(stickyScrolling: StickyScrolling) {\n stickyScrolling.destroy()\n}\n","import { createPlugin, config } from '@fullcalendar/common'\n\nimport premiumCommonPlugin from '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n// ensure ambient declarations\nimport '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n\nimport { ScrollGrid } from './ScrollGrid'\n\nexport { ScrollGrid }\nexport { setScrollFromStartingEdge } from './scroll-left-norm'\n\nexport default createPlugin({\n deps: [\n premiumCommonPlugin,\n ],\n scrollGridImpl: ScrollGrid,\n})\n\nconfig.SCROLLGRID_RESIZE_INTERVAL = 500\n"],"names":[],"mappings":";;;;;;;;;AAEA,IAAM,iBAAiB,GAAG,qDAAqD,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAE1F;;;AAGA;IASE,wBAAmB,EAAe;QAAlC,iBAQC;QARkB,OAAE,GAAF,EAAE,CAAa;QARlC,YAAO,GAAG,IAAI,OAAO,EAAE,CAAA;QACf,gBAAW,GAAG,KAAK,CAAA;QACnB,eAAU,GAAG,KAAK,CAAA;QAClB,sBAAiB,GAAG,KAAK,CAAA;QACzB,uBAAkB,GAAG,KAAK,CAAA;QAC1B,gBAAW,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QACnE,iBAAY,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;;;QA+C7E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C1B,IAAI,EAAE;QACJ,mBAAmB;KACpB;IACD,cAAc,EAAE,UAAU;CAC3B,CAAC,CAAA;AAEF,MAAM,CAAC,0BAA0B,GAAG,GAAG;;;;;"}
|
|
1
|
+
{"version":3,"file":"main.js","sources":["src/ScrollListener.ts","src/scroll-left-norm.tsx","src/StickyScrolling.ts","src/ClippedScroller.tsx","src/ScrollSyncer.ts","src/ScrollGrid.tsx","src/main.ts"],"sourcesContent":["import { Emitter, DelayedRunner } from '@fullcalendar/common'\n\nconst WHEEL_EVENT_NAMES = 'wheel mousewheel DomMouseScroll MozMousePixelScroll'.split(' ')\n\n/*\nALSO, with the ability to disable touch\n*/\nexport class ScrollListener {\n emitter = new Emitter()\n private isScrolling = false\n private isTouching = false // user currently has finger down?\n private isRecentlyWheeled = false\n private isRecentlyScrolled = false\n private wheelWaiter = new DelayedRunner(this._handleWheelWaited.bind(this))\n private scrollWaiter = new DelayedRunner(this._handleScrollWaited.bind(this))\n\n constructor(public el: HTMLElement) {\n el.addEventListener('scroll', this.handleScroll)\n el.addEventListener('touchstart', this.handleTouchStart, { passive: true })\n el.addEventListener('touchend', this.handleTouchEnd)\n\n for (let eventName of WHEEL_EVENT_NAMES) {\n el.addEventListener(eventName, this.handleWheel)\n }\n }\n\n destroy() {\n let { el } = this\n el.removeEventListener('scroll', this.handleScroll)\n el.removeEventListener('touchstart', this.handleTouchStart, { passive: true } as AddEventListenerOptions)\n el.removeEventListener('touchend', this.handleTouchEnd)\n\n for (let eventName of WHEEL_EVENT_NAMES) {\n el.removeEventListener(eventName, this.handleWheel)\n }\n }\n\n // Start / Stop\n // ----------------------------------------------------------------------------------------------\n\n private startScroll() {\n if (!this.isScrolling) {\n this.isScrolling = true\n this.emitter.trigger('scrollStart', this.isRecentlyWheeled, this.isTouching)\n }\n }\n\n endScroll() {\n if (this.isScrolling) {\n this.emitter.trigger('scrollEnd')\n this.isScrolling = false\n this.isRecentlyScrolled = true\n this.isRecentlyWheeled = false\n this.scrollWaiter.clear()\n this.wheelWaiter.clear()\n }\n }\n\n // Handlers\n // ----------------------------------------------------------------------------------------------\n\n handleScroll = () => {\n this.startScroll()\n this.emitter.trigger('scroll', this.isRecentlyWheeled, this.isTouching)\n this.isRecentlyScrolled = true\n this.scrollWaiter.request(500)\n }\n\n _handleScrollWaited() {\n this.isRecentlyScrolled = false\n\n // only end the scroll if not currently touching.\n // if touching, the scrolling will end later, on touchend.\n if (!this.isTouching) {\n this.endScroll() // won't fire if already ended\n }\n }\n\n // will fire *before* the scroll event is fired (might not cause a scroll)\n handleWheel = () => {\n this.isRecentlyWheeled = true\n this.wheelWaiter.request(500)\n }\n\n _handleWheelWaited() {\n this.isRecentlyWheeled = false\n }\n\n // will fire *before* the scroll event is fired (might not cause a scroll)\n handleTouchStart = () => {\n this.isTouching = true\n }\n\n handleTouchEnd = () => {\n this.isTouching = false\n\n // if the user ended their touch, and the scroll area wasn't moving,\n // we consider this to be the end of the scroll.\n if (!this.isRecentlyScrolled) {\n this.endScroll() // won't fire if already ended\n }\n }\n}\n","import { removeElement, computeEdges } from '@fullcalendar/common'\n\n// TODO: assume the el has no borders?\nexport function getScrollCanvasOrigin(scrollEl: HTMLElement) { // best place for this?\n let rect = scrollEl.getBoundingClientRect()\n let edges = computeEdges(scrollEl) // TODO: pass in isRtl?\n\n return {\n left: rect.left + edges.borderLeft + edges.scrollbarLeft - getScrollFromLeftEdge(scrollEl),\n top: rect.top + edges.borderTop - scrollEl.scrollTop,\n }\n}\n\nexport function getScrollFromLeftEdge(el: HTMLElement) {\n let scrollLeft = el.scrollLeft\n let computedStyles = window.getComputedStyle(el) // TODO: pass in isRtl instead?\n\n if (computedStyles.direction === 'rtl') {\n switch (getRtlScrollSystem()) {\n case 'negative':\n scrollLeft *= -1 // convert to 'reverse'. fall through...\n case 'reverse': // scrollLeft is distance between scrollframe's right edge scrollcanvas's right edge\n scrollLeft = el.scrollWidth - scrollLeft - el.clientWidth\n }\n }\n\n return scrollLeft\n}\n\nexport function setScrollFromLeftEdge(el: HTMLElement, scrollLeft: number) {\n let computedStyles = window.getComputedStyle(el) // TODO: pass in isRtl instead?\n\n if (computedStyles.direction === 'rtl') {\n switch (getRtlScrollSystem()) {\n case 'reverse':\n scrollLeft = el.scrollWidth - scrollLeft\n break\n case 'negative':\n scrollLeft = -(el.scrollWidth - scrollLeft)\n break\n }\n }\n\n el.scrollLeft = scrollLeft\n}\n\n// Horizontal Scroll System Detection\n// ----------------------------------------------------------------------------------------------\n\nlet _rtlScrollSystem\n\nfunction getRtlScrollSystem() {\n return _rtlScrollSystem || (_rtlScrollSystem = detectRtlScrollSystem())\n}\n\nfunction detectRtlScrollSystem() {\n let el = document.createElement('div')\n el.style.position = 'absolute'\n el.style.top = '-1000px'\n el.style.width = '1px'\n el.style.height = '1px'\n el.style.overflow = 'scroll'\n el.style.direction = 'rtl'\n el.style.fontSize = '100px'\n el.innerHTML = 'A'\n\n document.body.appendChild(el)\n\n let system\n if (el.scrollLeft > 0) {\n system = 'positive' // scroll is a positive number from the left edge\n } else {\n el.scrollLeft = 1\n if (el.scrollLeft > 0) {\n system = 'reverse' // scroll is a positive number from the right edge\n } else {\n system = 'negative' // scroll is a negative number from the right edge\n }\n }\n\n removeElement(el)\n return system\n}\n","import {\n applyStyle,\n translateRect, Rect, Point,\n findElements,\n computeInnerRect,\n CssDimValue,\n removeElement,\n} from '@fullcalendar/common'\nimport { ScrollListener } from './ScrollListener'\nimport { getScrollCanvasOrigin, getScrollFromLeftEdge } from './scroll-left-norm'\n\ninterface ElementGeom {\n parentBound: Rect // relative to the canvas origin\n naturalBound: Rect | null // of the el itself\n elWidth: number\n elHeight: number\n textAlign: string\n}\n\nconst IS_MS_EDGE = typeof navigator !== 'undefined' && /Edge/.test(navigator.userAgent) // TODO: what about Chromeum-based Edge?\nconst STICKY_SELECTOR = '.fc-sticky'\n\n/*\nuseful beyond the native position:sticky for these reasons:\n- support in IE11\n- nice centering support\n\nREQUIREMENT: fc-sticky elements, if the fc-sticky className is taken away, should NOT have relative or absolute positioning.\nThis is because we attach the coords with JS, and the VDOM might take away the fc-sticky class but doesn't know kill the positioning.\n\nTODO: don't query text-align:center. isn't compatible with flexbox centering. instead, check natural X coord within parent container\n*/\nexport class StickyScrolling {\n listener?: ScrollListener\n usingRelative: boolean | null = null\n\n constructor(\n private scrollEl: HTMLElement,\n private isRtl: boolean,\n ) {\n this.usingRelative =\n !getStickySupported() || // IE11\n // https://stackoverflow.com/questions/56835658/in-microsoft-edge-sticky-positioning-doesnt-work-when-combined-with-dir-rtl\n (IS_MS_EDGE && isRtl)\n\n if (this.usingRelative) {\n this.listener = new ScrollListener(scrollEl)\n this.listener.emitter.on('scrollEnd', this.updateSize)\n }\n }\n\n destroy() {\n if (this.listener) {\n this.listener.destroy()\n }\n }\n\n updateSize = () => {\n let { scrollEl } = this\n let els = findElements(scrollEl, STICKY_SELECTOR)\n let elGeoms = this.queryElGeoms(els)\n let viewportWidth = scrollEl.clientWidth\n let viewportHeight = scrollEl.clientHeight\n\n if (this.usingRelative) {\n let elDestinations = this.computeElDestinations(elGeoms, viewportWidth) // read before prepPositioning\n\n assignRelativePositions(els, elGeoms, elDestinations, viewportWidth, viewportHeight)\n } else {\n assignStickyPositions(els, elGeoms, viewportWidth)\n }\n }\n\n queryElGeoms(els: HTMLElement[]): ElementGeom[] {\n let { scrollEl, isRtl } = this\n let canvasOrigin = getScrollCanvasOrigin(scrollEl)\n let elGeoms: ElementGeom[] = []\n\n for (let el of els) {\n let parentBound = translateRect(\n computeInnerRect(el.parentNode as HTMLElement, true, true), // weird way to call this!!!\n -canvasOrigin.left,\n -canvasOrigin.top,\n )\n\n let elRect = el.getBoundingClientRect()\n let computedStyles = window.getComputedStyle(el)\n let textAlign = window.getComputedStyle(el.parentNode as HTMLElement).textAlign // ask the parent\n let naturalBound = null\n\n if (textAlign === 'start') {\n textAlign = isRtl ? 'right' : 'left'\n } else if (textAlign === 'end') {\n textAlign = isRtl ? 'left' : 'right'\n }\n\n if (computedStyles.position !== 'sticky') {\n naturalBound = translateRect(\n elRect,\n -canvasOrigin.left - (parseFloat(computedStyles.left) || 0), // could be 'auto'\n -canvasOrigin.top - (parseFloat(computedStyles.top) || 0),\n )\n }\n\n elGeoms.push({\n parentBound,\n naturalBound,\n elWidth: elRect.width,\n elHeight: elRect.height,\n textAlign,\n })\n }\n\n return elGeoms\n }\n\n // only for IE\n computeElDestinations(elGeoms: ElementGeom[], viewportWidth: number): Point[] {\n let { scrollEl } = this\n let viewportTop = scrollEl.scrollTop\n let viewportLeft = getScrollFromLeftEdge(scrollEl)\n let viewportRight = viewportLeft + viewportWidth\n\n return elGeoms.map((elGeom) => {\n let { elWidth, elHeight, parentBound, naturalBound } = elGeom\n let destLeft // relative to canvas topleft\n let destTop // \"\n\n switch (elGeom.textAlign) {\n case 'left':\n destLeft = viewportLeft\n break\n case 'right':\n destLeft = viewportRight - elWidth\n break\n case 'center':\n destLeft = (viewportLeft + viewportRight) / 2 - elWidth / 2 /// noooo, use half-width insteadddddddd\n break\n }\n\n destLeft = Math.min(destLeft, parentBound.right - elWidth)\n destLeft = Math.max(destLeft, parentBound.left)\n\n destTop = viewportTop\n destTop = Math.min(destTop, parentBound.bottom - elHeight)\n destTop = Math.max(destTop, naturalBound.top) // better to use natural top for upper bound\n\n return { left: destLeft, top: destTop }\n })\n }\n}\n\nfunction assignRelativePositions(\n els: HTMLElement[],\n elGeoms: ElementGeom[],\n elDestinations: Point[],\n viewportWidth: number,\n viewportHeight: number,\n) {\n els.forEach((el, i) => {\n let { naturalBound, parentBound } = elGeoms[i]\n let parentWidth = parentBound.right - parentBound.left\n let parentHeight = parentBound.bottom - parentBound.bottom\n let left: CssDimValue\n let top: CssDimValue\n\n if (\n parentWidth > viewportWidth ||\n parentHeight > viewportHeight\n ) {\n left = elDestinations[i].left - naturalBound.left\n top = elDestinations[i].top - naturalBound.top\n } else { // if parent container can be completely in view, we don't need stickiness\n left = ''\n top = ''\n }\n\n applyStyle(el, {\n position: 'relative',\n left,\n right: -left, // for rtl\n top,\n })\n })\n}\n\nfunction assignStickyPositions(els: HTMLElement[], elGeoms: ElementGeom[], viewportWidth: number) {\n els.forEach((el, i) => {\n let { textAlign, elWidth, parentBound } = elGeoms[i]\n let parentWidth = parentBound.right - parentBound.left\n let left: CssDimValue\n\n if (\n textAlign === 'center' &&\n parentWidth > viewportWidth\n ) {\n left = (viewportWidth - elWidth) / 2\n } else { // if parent container can be completely in view, we don't need stickiness\n left = ''\n }\n\n applyStyle(el, { // will already have fc-sticky class which makes it sticky\n left,\n right: left, // for when centered\n top: 0,\n })\n })\n}\n\nlet _isStickySupported\n\nfunction getStickySupported() {\n if (_isStickySupported == null) {\n _isStickySupported = computeStickySupported()\n }\n return _isStickySupported\n}\n\nfunction computeStickySupported() {\n let el = document.createElement('div')\n el.style.position = 'sticky'\n document.body.appendChild(el)\n let val = window.getComputedStyle(el).position\n removeElement(el)\n return val === 'sticky'\n}\n","import {\n createElement, ComponentChildren, createRef, Ref, BaseComponent, setRef,\n ScrollerLike,\n Scroller, OverflowValue,\n getIsRtlScrollbarOnLeft,\n isPropsEqual,\n} from '@fullcalendar/common'\n\nexport type ClippedOverflowValue = OverflowValue | 'scroll-hidden'\n\nexport interface ClippedScrollerProps {\n overflowX: ClippedOverflowValue\n overflowY: ClippedOverflowValue\n liquid: boolean\n maxHeight?: number // incompatible with liquid\n children?: ComponentChildren\n scrollerRef?: Ref<Scroller>\n scrollerElRef?: Ref<HTMLElement>\n}\n\ninterface ClippedScrollerState {\n yScrollbarWidth?: number\n xScrollbarWidth?: number\n}\n\nexport class ClippedScroller extends BaseComponent<ClippedScrollerProps, ClippedScrollerState> implements ScrollerLike {\n private elRef = createRef<HTMLDivElement>()\n private scroller: Scroller\n\n state = {\n xScrollbarWidth: 0,\n yScrollbarWidth: 0,\n }\n\n render() {\n let { props, state, context } = this\n let isScrollbarOnLeft = context.isRtl && getIsRtlScrollbarOnLeft()\n let overcomeLeft = 0\n let overcomeRight = 0\n let overcomeBottom = 0\n\n if (props.overflowX === 'scroll-hidden') {\n overcomeBottom = state.xScrollbarWidth\n }\n\n if (props.overflowY === 'scroll-hidden') {\n if (state.yScrollbarWidth != null) {\n if (isScrollbarOnLeft) {\n overcomeLeft = state.yScrollbarWidth\n } else {\n overcomeRight = state.yScrollbarWidth\n }\n }\n }\n\n return (\n <div\n ref={this.elRef}\n className={'fc-scroller-harness' + (props.liquid ? ' fc-scroller-harness-liquid' : '')}\n >\n <Scroller\n ref={this.handleScroller}\n elRef={this.props.scrollerElRef}\n overflowX={props.overflowX === 'scroll-hidden' ? 'scroll' : props.overflowX}\n overflowY={props.overflowY === 'scroll-hidden' ? 'scroll' : props.overflowY}\n overcomeLeft={overcomeLeft}\n overcomeRight={overcomeRight}\n overcomeBottom={overcomeBottom}\n maxHeight={\n typeof props.maxHeight === 'number'\n ? (props.maxHeight + (props.overflowX === 'scroll-hidden' ? state.xScrollbarWidth : 0))\n : ''\n }\n liquid={props.liquid}\n liquidIsAbsolute\n >\n {props.children}\n </Scroller>\n </div>\n )\n }\n\n handleScroller = (scroller: Scroller) => {\n this.scroller = scroller\n setRef(this.props.scrollerRef, scroller)\n }\n\n componentDidMount() {\n this.handleSizing()\n this.context.addResizeHandler(this.handleSizing)\n }\n\n componentDidUpdate(prevProps: ClippedScrollerProps) {\n if (!isPropsEqual(prevProps, this.props)) { // an external change?\n this.handleSizing()\n }\n }\n\n componentWillUnmount() {\n this.context.removeResizeHandler(this.handleSizing)\n }\n\n handleSizing = () => {\n let { props } = this\n\n if (props.overflowY === 'scroll-hidden') {\n this.setState({ yScrollbarWidth: this.scroller.getYScrollbarWidth() })\n }\n\n if (props.overflowX === 'scroll-hidden') {\n this.setState({ xScrollbarWidth: this.scroller.getXScrollbarWidth() })\n }\n }\n\n needsXScrolling() {\n return this.scroller.needsXScrolling()\n }\n\n needsYScrolling() {\n return this.scroller.needsYScrolling()\n }\n}\n","import { ScrollListener } from './ScrollListener'\nimport { setScrollFromLeftEdge } from './scroll-left-norm'\n\nexport class ScrollSyncer {\n private masterEl: HTMLElement\n private scrollListeners: ScrollListener[]\n private isPaused: boolean = false\n\n constructor(\n private isVertical: boolean,\n private scrollEls: HTMLElement[],\n ) {\n this.scrollListeners = scrollEls.map((el) => this.bindScroller(el))\n }\n\n destroy() {\n for (let scrollListener of this.scrollListeners) {\n scrollListener.destroy()\n }\n }\n\n bindScroller(el: HTMLElement) {\n let { scrollEls, isVertical } = this\n let scrollListener = new ScrollListener(el)\n\n const onScroll = (isWheel, isTouch) => {\n if (!this.isPaused) {\n if (!this.masterEl || (this.masterEl !== el && (isWheel || isTouch))) {\n this.assignMaster(el)\n }\n\n if (this.masterEl === el) { // dealing with current\n for (let otherEl of scrollEls) {\n if (otherEl !== el) {\n if (isVertical) {\n otherEl.scrollTop = el.scrollTop\n } else {\n otherEl.scrollLeft = el.scrollLeft\n }\n }\n }\n }\n }\n }\n\n const onScrollEnd = () => {\n if (this.masterEl === el) {\n this.masterEl = null\n }\n }\n\n scrollListener.emitter.on('scroll', onScroll)\n scrollListener.emitter.on('scrollEnd', onScrollEnd)\n\n return scrollListener\n }\n\n assignMaster(el: HTMLElement) {\n this.masterEl = el\n\n for (let scrollListener of this.scrollListeners) {\n if (scrollListener.el !== el) {\n scrollListener.endScroll() // to prevent residual scrolls from reclaiming master\n }\n }\n }\n\n /*\n will normalize the scrollLeft value\n */\n forceScrollLeft(scrollLeft: number) {\n this.isPaused = true\n\n for (let listener of this.scrollListeners) {\n setScrollFromLeftEdge(listener.el, scrollLeft)\n }\n\n this.isPaused = false\n }\n\n forceScrollTop(top: number) {\n this.isPaused = true\n\n for (let listener of this.scrollListeners) {\n listener.el.scrollTop = top\n }\n\n this.isPaused = false\n }\n}\n","import {\n createElement, VNode, Fragment,\n BaseComponent,\n isArraysEqual,\n findElements,\n mapHash,\n RefMap,\n ColProps, CssDimValue, hasShrinkWidth, renderMicroColGroup,\n ScrollGridProps, ScrollGridSectionConfig, ColGroupConfig,\n getScrollGridClassNames, getSectionClassNames, getSectionHasLiquidHeight, getAllowYScrolling, renderChunkContent, computeShrinkWidth,\n getIsRtlScrollbarOnLeft,\n setRef,\n sanitizeShrinkWidth,\n isPropsEqual,\n compareObjs,\n isColPropsEqual,\n getScrollbarWidths,\n memoizeArraylike,\n collectFromHash,\n memoizeHashlike,\n ScrollGridChunkConfig,\n getCanVGrowWithinCell,\n config,\n} from '@fullcalendar/common'\nimport { StickyScrolling } from './StickyScrolling'\nimport { ClippedScroller, ClippedOverflowValue } from './ClippedScroller'\nimport { ScrollSyncer } from './ScrollSyncer'\n\ninterface ScrollGridState {\n shrinkWidths: number[] // for only one col within each vertical stack of chunks\n forceYScrollbars: boolean // null means not computed yet\n forceXScrollbars: boolean // \"\n scrollerClientWidths: { [index: string]: number } // why not use array?\n scrollerClientHeights: { [index: string]: number }\n sectionRowMaxHeights: number[][][]\n}\n\ninterface ColGroupStat {\n hasShrinkCol: boolean\n totalColWidth: number\n totalColMinWidth: number\n allowXScrolling: boolean\n width?: CssDimValue\n cols: ColProps[]\n}\n\n/*\nTODO: make <ScrollGridSection> subcomponent\nNOTE: doesn't support collapsibleWidth (which is sortof a hack anyway)\n*/\nexport class ScrollGrid extends BaseComponent<ScrollGridProps, ScrollGridState> {\n private compileColGroupStats = memoizeArraylike(compileColGroupStat, isColGroupStatsEqual)\n private renderMicroColGroups = memoizeArraylike(renderMicroColGroup) // yucky to memoize VNodes, but much more efficient for consumers\n private clippedScrollerRefs = new RefMap<ClippedScroller>()\n\n // doesn't hold non-scrolling els used just for padding\n private scrollerElRefs = new RefMap<HTMLElement>(this._handleScrollerEl.bind(this))\n\n private chunkElRefs = new RefMap<HTMLTableCellElement>(this._handleChunkEl.bind(this))\n private getStickyScrolling = memoizeArraylike(initStickyScrolling, null, destroyStickyScrolling)\n private getScrollSyncersBySection = memoizeHashlike(initScrollSyncer.bind(this, true), null, destroyScrollSyncer)\n private getScrollSyncersByColumn = memoizeHashlike(initScrollSyncer.bind(this, false), null, destroyScrollSyncer)\n private stickyScrollings: StickyScrolling[] = []\n private scrollSyncersBySection: { [sectionI: string]: ScrollSyncer } = {}\n private scrollSyncersByColumn: { [columnI: string]: ScrollSyncer } = {}\n\n // for row-height-syncing\n private rowUnstableMap = new Map<HTMLTableRowElement, boolean>() // no need to groom. always self-cancels\n private rowInnerMaxHeightMap = new Map<HTMLTableRowElement, number>()\n private anyRowHeightsChanged = false\n\n private lastSizingDate: Date\n private recentSizingCnt = 0\n\n state: ScrollGridState = {\n shrinkWidths: [],\n forceYScrollbars: false,\n forceXScrollbars: false,\n scrollerClientWidths: {},\n scrollerClientHeights: {},\n sectionRowMaxHeights: [],\n }\n\n render(): VNode {\n let { props, state, context } = this\n let { shrinkWidths } = state\n\n let colGroupStats = this.compileColGroupStats(props.colGroups.map((colGroup) => [colGroup]))\n let microColGroupNodes = this.renderMicroColGroups(colGroupStats.map((stat, i) => [stat.cols, shrinkWidths[i]]))\n let classNames = getScrollGridClassNames(props.liquid, context)\n\n // yuck\n let indices: [ number, number ][] = []\n let [sectionCnt, chunksPerSection] = this.getDims()\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n indices.push([sectionI, chunkI])\n }\n }\n\n // TODO: make DRY\n let sectionConfigs = props.sections\n let configCnt = sectionConfigs.length\n let configI = 0\n let currentConfig: ScrollGridSectionConfig\n let headSectionNodes: VNode[] = []\n let bodySectionNodes: VNode[] = []\n let footSectionNodes: VNode[] = []\n\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {\n headSectionNodes.push(this.renderSection(\n currentConfig,\n configI,\n colGroupStats,\n microColGroupNodes,\n state.sectionRowMaxHeights,\n true,\n ))\n configI += 1\n }\n\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {\n bodySectionNodes.push(this.renderSection(\n currentConfig,\n configI,\n colGroupStats,\n microColGroupNodes,\n state.sectionRowMaxHeights,\n false,\n ))\n configI += 1\n }\n\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {\n footSectionNodes.push(this.renderSection(\n currentConfig,\n configI,\n colGroupStats,\n microColGroupNodes,\n state.sectionRowMaxHeights,\n true,\n ))\n configI += 1\n }\n\n const isBuggy = !getCanVGrowWithinCell() // see NOTE in SimpleScrollGrid\n const roleAttrs = { role: 'rowgroup' }\n\n return createElement(\n 'table',\n {\n ref: props.elRef,\n role: 'grid',\n className: classNames.join(' '),\n },\n renderMacroColGroup(colGroupStats, shrinkWidths),\n Boolean(!isBuggy && headSectionNodes.length) && createElement('thead', roleAttrs, ...headSectionNodes),\n Boolean(!isBuggy && bodySectionNodes.length) && createElement('tbody', roleAttrs, ...bodySectionNodes),\n Boolean(!isBuggy && footSectionNodes.length) && createElement('tfoot', roleAttrs, ...footSectionNodes),\n isBuggy && createElement('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes),\n )\n }\n\n renderSection(\n sectionConfig: ScrollGridSectionConfig,\n sectionIndex: number,\n colGroupStats: ColGroupStat[],\n microColGroupNodes: VNode[],\n sectionRowMaxHeights: number[][][],\n isHeader: boolean,\n ): VNode {\n if ('outerContent' in sectionConfig) {\n return (\n <Fragment key={sectionConfig.key}>\n {sectionConfig.outerContent}\n </Fragment>\n )\n }\n\n return (\n <tr\n key={sectionConfig.key}\n role=\"presentation\"\n className={getSectionClassNames(sectionConfig, this.props.liquid).join(' ')}\n >\n {sectionConfig.chunks.map((chunkConfig, i) => this.renderChunk(\n sectionConfig,\n sectionIndex,\n colGroupStats[i],\n microColGroupNodes[i],\n chunkConfig,\n i,\n (sectionRowMaxHeights[sectionIndex] || [])[i] || [],\n isHeader,\n ))}\n </tr>\n )\n }\n\n renderChunk(\n sectionConfig: ScrollGridSectionConfig,\n sectionIndex: number,\n colGroupStat: ColGroupStat | undefined,\n microColGroupNode: VNode | undefined,\n chunkConfig: ScrollGridChunkConfig,\n chunkIndex: number,\n rowHeights: number[],\n isHeader: boolean,\n ): VNode {\n if ('outerContent' in chunkConfig) {\n return (\n <Fragment key={chunkConfig.key}>\n {chunkConfig.outerContent}\n </Fragment>\n )\n }\n\n let { state } = this\n let { scrollerClientWidths, scrollerClientHeights } = state\n\n let [sectionCnt, chunksPerSection] = this.getDims()\n let index = sectionIndex * chunksPerSection + chunkIndex\n let sideScrollIndex = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0\n let isVScrollSide = chunkIndex === sideScrollIndex\n let isLastSection = sectionIndex === sectionCnt - 1\n\n let forceXScrollbars = isLastSection && state.forceXScrollbars // NOOOO can result in `null`\n let forceYScrollbars = isVScrollSide && state.forceYScrollbars // NOOOO can result in `null`\n\n let allowXScrolling = colGroupStat && colGroupStat.allowXScrolling // rename?\n let allowYScrolling = getAllowYScrolling(this.props, sectionConfig) // rename? do in section func?\n\n let chunkVGrow = getSectionHasLiquidHeight(this.props, sectionConfig) // do in section func?\n let expandRows = sectionConfig.expandRows && chunkVGrow\n let tableMinWidth = (colGroupStat && colGroupStat.totalColMinWidth) || ''\n\n let content = renderChunkContent(sectionConfig, chunkConfig, {\n tableColGroupNode: microColGroupNode,\n tableMinWidth,\n clientWidth: scrollerClientWidths[index] !== undefined ? scrollerClientWidths[index] : null,\n clientHeight: scrollerClientHeights[index] !== undefined ? scrollerClientHeights[index] : null,\n expandRows,\n syncRowHeights: Boolean(sectionConfig.syncRowHeights),\n rowSyncHeights: rowHeights,\n reportRowHeightChange: this.handleRowHeightChange,\n }, isHeader)\n\n let overflowX: ClippedOverflowValue =\n forceXScrollbars ? (isLastSection ? 'scroll' : 'scroll-hidden') :\n !allowXScrolling ? 'hidden' :\n (isLastSection ? 'auto' : 'scroll-hidden')\n\n let overflowY: ClippedOverflowValue =\n forceYScrollbars ? (isVScrollSide ? 'scroll' : 'scroll-hidden') :\n !allowYScrolling ? 'hidden' :\n (isVScrollSide ? 'auto' : 'scroll-hidden')\n\n // it *could* be possible to reduce DOM wrappers by only doing a ClippedScroller when allowXScrolling or allowYScrolling,\n // but if these values were to change, the inner components would be unmounted/remounted because of the parent change.\n content = (\n <ClippedScroller\n ref={this.clippedScrollerRefs.createRef(index)}\n scrollerElRef={this.scrollerElRefs.createRef(index)}\n overflowX={overflowX}\n overflowY={overflowY}\n liquid={chunkVGrow}\n maxHeight={sectionConfig.maxHeight}\n >\n {content}\n </ClippedScroller>\n )\n\n return createElement(\n isHeader ? 'th' : 'td',\n {\n key: chunkConfig.key,\n ref: this.chunkElRefs.createRef(index) as any,\n role: 'presentation',\n },\n content,\n )\n }\n\n componentDidMount() {\n this.updateScrollSyncers()\n this.handleSizing(false)\n\n this.context.addResizeHandler(this.handleSizing)\n }\n\n componentDidUpdate(prevProps: ScrollGridProps, prevState: ScrollGridState) {\n this.updateScrollSyncers()\n\n // TODO: need better solution when state contains non-sizing things\n this.handleSizing(false, prevState.sectionRowMaxHeights !== this.state.sectionRowMaxHeights)\n }\n\n componentWillUnmount() {\n this.context.removeResizeHandler(this.handleSizing)\n\n this.destroyStickyScrolling()\n this.destroyScrollSyncers()\n }\n\n handleSizing = (isForcedResize: boolean, sectionRowMaxHeightsChanged?: boolean) => {\n if (!this.allowSizing()) {\n return\n }\n\n if (!sectionRowMaxHeightsChanged) { // something else changed, probably external\n this.anyRowHeightsChanged = true\n }\n\n let otherState: Partial<ScrollGridState> = {}\n\n // if reacting to self-change of sectionRowMaxHeightsChanged, or not stable, don't do anything\n if (isForcedResize || (!sectionRowMaxHeightsChanged && !this.rowUnstableMap.size)) {\n otherState.sectionRowMaxHeights = this.computeSectionRowMaxHeights()\n }\n\n this.setState({\n shrinkWidths: this.computeShrinkWidths(),\n ...this.computeScrollerDims(),\n ...(otherState as any), // wtf\n }, () => {\n if (!this.rowUnstableMap.size) {\n this.updateStickyScrolling() // needs to happen AFTER final positioning committed to DOM\n }\n })\n }\n\n allowSizing() {\n let now = new Date()\n\n if (\n !this.lastSizingDate ||\n now.valueOf() > this.lastSizingDate.valueOf() + config.SCROLLGRID_RESIZE_INTERVAL\n ) {\n this.lastSizingDate = now\n this.recentSizingCnt = 0\n return true\n }\n\n return (this.recentSizingCnt += 1) <= 10\n }\n\n handleRowHeightChange = (rowEl: HTMLTableRowElement, isStable: boolean) => {\n let { rowUnstableMap, rowInnerMaxHeightMap } = this\n\n if (!isStable) {\n rowUnstableMap.set(rowEl, true)\n } else {\n rowUnstableMap.delete(rowEl)\n\n let innerMaxHeight = getRowInnerMaxHeight(rowEl)\n if (!rowInnerMaxHeightMap.has(rowEl) || rowInnerMaxHeightMap.get(rowEl) !== innerMaxHeight) {\n rowInnerMaxHeightMap.set(rowEl, innerMaxHeight)\n this.anyRowHeightsChanged = true\n }\n\n if (!rowUnstableMap.size && this.anyRowHeightsChanged) {\n this.anyRowHeightsChanged = false\n this.setState({\n sectionRowMaxHeights: this.computeSectionRowMaxHeights(),\n })\n }\n }\n }\n\n computeShrinkWidths() {\n let colGroupStats = this.compileColGroupStats(this.props.colGroups.map((colGroup) => [colGroup]))\n let [sectionCnt, chunksPerSection] = this.getDims()\n let cnt = sectionCnt * chunksPerSection\n let shrinkWidths: number[] = []\n\n colGroupStats.forEach((colGroupStat, i) => {\n if (colGroupStat.hasShrinkCol) {\n let chunkEls = this.chunkElRefs.collect(i, cnt, chunksPerSection) // in one col\n shrinkWidths[i] = computeShrinkWidth(chunkEls)\n }\n })\n\n return shrinkWidths\n }\n\n // has the side effect of grooming rowInnerMaxHeightMap\n // TODO: somehow short-circuit if there are no new height changes\n private computeSectionRowMaxHeights() {\n let newHeightMap = new Map<HTMLTableRowElement, number>()\n\n let [sectionCnt, chunksPerSection] = this.getDims()\n let sectionRowMaxHeights: number[][][] = []\n\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n let sectionConfig = this.props.sections[sectionI]\n let assignableHeights: number[][] = [] // chunk, row\n\n if (sectionConfig && sectionConfig.syncRowHeights) {\n let rowHeightsByChunk: number[][] = []\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n let index = sectionI * chunksPerSection + chunkI\n let rowHeights: number[] = []\n\n let chunkEl = this.chunkElRefs.currentMap[index]\n if (chunkEl) {\n rowHeights = findElements(chunkEl, '.fc-scrollgrid-sync-table tr').map((rowEl: HTMLTableRowElement) => {\n let max = getRowInnerMaxHeight(rowEl)\n newHeightMap.set(rowEl, max)\n return max\n })\n } else {\n rowHeights = []\n }\n\n rowHeightsByChunk.push(rowHeights)\n }\n\n let rowCnt = rowHeightsByChunk[0].length\n let isEqualRowCnt = true\n\n for (let chunkI = 1; chunkI < chunksPerSection; chunkI += 1) {\n let isOuterContent = sectionConfig.chunks[chunkI] && sectionConfig.chunks[chunkI].outerContent !== undefined // can be null\n\n if (!isOuterContent && rowHeightsByChunk[chunkI].length !== rowCnt) { // skip outer content\n isEqualRowCnt = false\n break\n }\n }\n\n if (!isEqualRowCnt) {\n let chunkHeightSums: number[] = []\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n chunkHeightSums.push(\n sumNumbers(rowHeightsByChunk[chunkI]) + rowHeightsByChunk[chunkI].length, // add in border\n )\n }\n\n let maxTotalSum = Math.max(...chunkHeightSums)\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n let rowInChunkCnt = rowHeightsByChunk[chunkI].length\n let rowInChunkTotalHeight = maxTotalSum - rowInChunkCnt // subtract border\n\n // height of non-first row. we do this to avoid rounding, because it's unreliable within a table\n let rowInChunkHeightOthers = Math.floor(rowInChunkTotalHeight / rowInChunkCnt)\n\n // whatever is leftover goes to the first row\n let rowInChunkHeightFirst = rowInChunkTotalHeight - rowInChunkHeightOthers * (rowInChunkCnt - 1)\n\n let rowInChunkHeights: number[] = []\n let row = 0\n\n if (row < rowInChunkCnt) {\n rowInChunkHeights.push(rowInChunkHeightFirst)\n row += 1\n }\n\n while (row < rowInChunkCnt) {\n rowInChunkHeights.push(rowInChunkHeightOthers)\n row += 1\n }\n\n assignableHeights.push(rowInChunkHeights)\n }\n } else {\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n assignableHeights.push([])\n }\n\n for (let row = 0; row < rowCnt; row += 1) {\n let rowHeightsAcrossChunks: number[] = []\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n let h = rowHeightsByChunk[chunkI][row]\n if (h != null) { // protect against outerContent\n rowHeightsAcrossChunks.push(h)\n }\n }\n\n let maxHeight = Math.max(...rowHeightsAcrossChunks)\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n assignableHeights[chunkI].push(maxHeight)\n }\n }\n }\n }\n\n sectionRowMaxHeights.push(assignableHeights)\n }\n\n this.rowInnerMaxHeightMap = newHeightMap\n\n return sectionRowMaxHeights\n }\n\n computeScrollerDims() {\n let scrollbarWidth = getScrollbarWidths()\n let [sectionCnt, chunksPerSection] = this.getDims()\n let sideScrollI = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0\n let lastSectionI = sectionCnt - 1\n let currentScrollers = this.clippedScrollerRefs.currentMap\n let scrollerEls = this.scrollerElRefs.currentMap\n let forceYScrollbars = false\n let forceXScrollbars = false\n let scrollerClientWidths: { [index: string]: number } = {}\n let scrollerClientHeights: { [index: string]: number } = {}\n\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) { // along edge\n let index = sectionI * chunksPerSection + sideScrollI\n let scroller = currentScrollers[index]\n\n if (scroller && scroller.needsYScrolling()) {\n forceYScrollbars = true\n break\n }\n }\n\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) { // along last row\n let index = lastSectionI * chunksPerSection + chunkI\n let scroller = currentScrollers[index]\n\n if (scroller && scroller.needsXScrolling()) {\n forceXScrollbars = true\n break\n }\n }\n\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n for (let chunkI = 0; chunkI < chunksPerSection; chunkI += 1) {\n let index = sectionI * chunksPerSection + chunkI\n let scrollerEl = scrollerEls[index]\n\n if (scrollerEl) {\n // TODO: weird way to get this. need harness b/c doesn't include table borders\n let harnessEl = scrollerEl.parentNode as HTMLElement\n\n scrollerClientWidths[index] = Math.floor(\n harnessEl.getBoundingClientRect().width - (\n (chunkI === sideScrollI && forceYScrollbars)\n ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future\n : 0\n ),\n )\n\n scrollerClientHeights[index] = Math.floor(\n harnessEl.getBoundingClientRect().height - (\n (sectionI === lastSectionI && forceXScrollbars)\n ? scrollbarWidth.x // use global because scroller might not have scrollbars yet but will need them in future\n : 0\n ),\n )\n }\n }\n }\n\n return { forceYScrollbars, forceXScrollbars, scrollerClientWidths, scrollerClientHeights }\n }\n\n updateStickyScrolling() {\n let { isRtl } = this.context\n let argsByKey = this.scrollerElRefs.getAll().map(\n (scrollEl) => [scrollEl, isRtl] as [ HTMLElement, boolean ],\n )\n\n let stickyScrollings = this.getStickyScrolling(argsByKey)\n\n stickyScrollings.forEach((stickyScrolling) => stickyScrolling.updateSize())\n\n this.stickyScrollings = stickyScrollings\n }\n\n destroyStickyScrolling() {\n this.stickyScrollings.forEach(destroyStickyScrolling)\n }\n\n updateScrollSyncers() {\n let [sectionCnt, chunksPerSection] = this.getDims()\n let cnt = sectionCnt * chunksPerSection\n let scrollElsBySection: { [sectionI: string]: HTMLElement[] } = {}\n let scrollElsByColumn: { [colI: string]: HTMLElement[] } = {}\n let scrollElMap = this.scrollerElRefs.currentMap\n\n for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {\n let startIndex = sectionI * chunksPerSection\n let endIndex = startIndex + chunksPerSection\n\n scrollElsBySection[sectionI] = collectFromHash(scrollElMap, startIndex, endIndex, 1) // use the filtered\n }\n\n for (let col = 0; col < chunksPerSection; col += 1) {\n scrollElsByColumn[col] = this.scrollerElRefs.collect(col, cnt, chunksPerSection) // DON'T use the filtered\n }\n\n this.scrollSyncersBySection = this.getScrollSyncersBySection(scrollElsBySection)\n this.scrollSyncersByColumn = this.getScrollSyncersByColumn(scrollElsByColumn)\n }\n\n destroyScrollSyncers() {\n mapHash(this.scrollSyncersBySection, destroyScrollSyncer)\n mapHash(this.scrollSyncersByColumn, destroyScrollSyncer)\n }\n\n getChunkConfigByIndex(index: number) { // somewhat expensive for something so simple\n let chunksPerSection = this.getDims()[1]\n let sectionI = Math.floor(index / chunksPerSection)\n let chunkI = index % chunksPerSection\n let sectionConfig = this.props.sections[sectionI]\n\n return sectionConfig && sectionConfig.chunks[chunkI]\n }\n\n forceScrollLeft(col: number, scrollLeft: number) {\n let scrollSyncer = this.scrollSyncersByColumn[col]\n\n if (scrollSyncer) {\n scrollSyncer.forceScrollLeft(scrollLeft)\n }\n }\n\n forceScrollTop(sectionI: number, scrollTop: number) {\n let scrollSyncer = this.scrollSyncersBySection[sectionI]\n\n if (scrollSyncer) {\n scrollSyncer.forceScrollTop(scrollTop)\n }\n }\n\n _handleChunkEl(chunkEl: HTMLTableCellElement | null, key: string) {\n let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10))\n\n if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef\n setRef(chunkConfig.elRef, chunkEl)\n }\n }\n\n _handleScrollerEl(scrollerEl: HTMLElement | null, key: string) {\n let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10))\n\n if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef\n setRef(chunkConfig.scrollerElRef, scrollerEl)\n }\n }\n\n getDims() {\n let sectionCnt = this.props.sections.length\n let chunksPerSection = sectionCnt ? this.props.sections[0].chunks.length : 0\n\n return [sectionCnt, chunksPerSection]\n }\n}\n\nScrollGrid.addStateEquality({\n shrinkWidths: isArraysEqual,\n scrollerClientWidths: isPropsEqual,\n scrollerClientHeights: isPropsEqual,\n})\n\nfunction sumNumbers(numbers: number[]) { // TODO: general util\n let sum = 0\n\n for (let n of numbers) {\n sum += n\n }\n\n return sum\n}\n\nfunction getRowInnerMaxHeight(rowEl: HTMLElement) {\n let innerHeights = findElements(rowEl, '.fc-scrollgrid-sync-inner').map(getElHeight)\n\n if (innerHeights.length) {\n return Math.max(...innerHeights)\n }\n\n return 0\n}\n\nfunction getElHeight(el: HTMLElement) {\n return el.offsetHeight // better to deal with integers, for rounding, for PureComponent\n}\n\nfunction renderMacroColGroup(colGroupStats: ColGroupStat[], shrinkWidths: number[]) {\n let children = colGroupStats.map((colGroupStat, i) => {\n let width = colGroupStat.width\n\n if (width === 'shrink') {\n width = colGroupStat.totalColWidth + sanitizeShrinkWidth(shrinkWidths[i]) + 1 // +1 for border :(\n }\n\n return ( // eslint-disable-next-line react/jsx-key\n <col style={{ width }} />\n )\n })\n\n return createElement('colgroup', {}, ...children)\n}\n\nfunction compileColGroupStat(colGroupConfig: ColGroupConfig): ColGroupStat {\n let totalColWidth = sumColProp(colGroupConfig.cols, 'width') // excludes \"shrink\"\n let totalColMinWidth = sumColProp(colGroupConfig.cols, 'minWidth')\n let hasShrinkCol = hasShrinkWidth(colGroupConfig.cols)\n let allowXScrolling = colGroupConfig.width !== 'shrink' && Boolean(totalColWidth || totalColMinWidth || hasShrinkCol)\n\n return {\n hasShrinkCol,\n totalColWidth,\n totalColMinWidth,\n allowXScrolling,\n cols: colGroupConfig.cols,\n width: colGroupConfig.width,\n }\n}\n\nfunction sumColProp(cols: ColProps[], propName: string) {\n let total = 0\n\n for (let col of cols) {\n let val = col[propName]\n\n if (typeof val === 'number') {\n total += val * (col.span || 1)\n }\n }\n\n return total\n}\n\nconst COL_GROUP_STAT_EQUALITY = {\n cols: isColPropsEqual,\n}\n\nfunction isColGroupStatsEqual(stat0: ColGroupStat, stat1: ColGroupStat): boolean {\n return compareObjs(stat0, stat1, COL_GROUP_STAT_EQUALITY)\n}\n\n// for memoizers...\n\nfunction initScrollSyncer(isVertical: boolean, ...scrollEls: HTMLElement[]) {\n return new ScrollSyncer(isVertical, scrollEls)\n}\n\nfunction destroyScrollSyncer(scrollSyncer: ScrollSyncer) {\n scrollSyncer.destroy()\n}\n\nfunction initStickyScrolling(scrollEl: HTMLElement, isRtl: boolean) {\n return new StickyScrolling(scrollEl, isRtl)\n}\n\nfunction destroyStickyScrolling(stickyScrolling: StickyScrolling) {\n stickyScrolling.destroy()\n}\n","import { createPlugin, config } from '@fullcalendar/common'\n\nimport premiumCommonPlugin from '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n// ensure ambient declarations\nimport '@fullcalendar/premium-common' // eslint-disable-line import/no-duplicates\n\nimport { ScrollGrid } from './ScrollGrid'\n\nexport { ScrollGrid }\nexport { setScrollFromLeftEdge } from './scroll-left-norm'\n\nexport default createPlugin({\n deps: [\n premiumCommonPlugin,\n ],\n scrollGridImpl: ScrollGrid,\n})\n\nconfig.SCROLLGRID_RESIZE_INTERVAL = 500\n"],"names":[],"mappings":";;;;;;;;;AAEA,IAAM,iBAAiB,GAAG,qDAAqD,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAE1F;;;AAGA;IASE,wBAAmB,EAAe;QAAlC,iBAQC;QARkB,OAAE,GAAF,EAAE,CAAa;QARlC,YAAO,GAAG,IAAI,OAAO,EAAE,CAAA;QACf,gBAAW,GAAG,KAAK,CAAA;QACnB,eAAU,GAAG,KAAK,CAAA;QAClB,sBAAiB,GAAG,KAAK,CAAA;QACzB,uBAAkB,GAAG,KAAK,CAAA;QAC1B,gBAAW,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QACnE,iBAAY,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;;;QA+C7E,iBAAY,GAAG;YACb,KAAI,CAAC,WAAW,EAAE,CAAA;YAClB,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAI,CAAC,iBAAiB,EAAE,KAAI,CAAC,UAAU,CAAC,CAAA;YACvE,KAAI,CAAC,kBAAkB,GAAG,IAAI,CAAA;YAC9B,KAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;SAC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AY,CAAC;IAC1B,IAAI,EAAE;QACJ,mBAAmB;KACpB;IACD,cAAc,EAAE,UAAU;CAC3B,CAAC,CAAA;AAEF,MAAM,CAAC,0BAA0B,GAAG,GAAG;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullcalendar/scrollgrid",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.1",
|
|
4
4
|
"title": "FullCalendar ScrollGrid Plugin",
|
|
5
5
|
"description": "Tabular data chunked into scrollable panes",
|
|
6
6
|
"docs": "https://fullcalendar.io/docs/scheduler",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@fullcalendar/common": "~5.
|
|
9
|
-
"@fullcalendar/premium-common": "~5.
|
|
10
|
-
"tslib": "^2.0
|
|
8
|
+
"@fullcalendar/common": "~5.10.1",
|
|
9
|
+
"@fullcalendar/premium-common": "~5.10.1",
|
|
10
|
+
"tslib": "^2.1.0"
|
|
11
11
|
},
|
|
12
12
|
"main": "main.cjs.js",
|
|
13
13
|
"module": "main.js",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"url": "http://arshaw.com/"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@fullcalendar/core-preact": "5.
|
|
31
|
+
"@fullcalendar/core-preact": "5.10.1"
|
|
32
32
|
}
|
|
33
33
|
}
|