@fullcalendar/scrollgrid 6.0.2 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +14 -0
- package/index.global.js +2 -2
- package/index.global.min.js +2 -2
- package/index.js +18 -10
- package/{internal.cjs → internal.esm.js} +62 -66
- package/internal.js +66 -62
- package/package.json +9 -13
- package/index.cjs +0 -22
- package/index.js.map +0 -1
- package/internal.js.map +0 -1
package/index.esm.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createPlugin } from '@fullcalendar/core';
|
|
2
|
+
import premiumCommonPlugin from '@fullcalendar/premium-common';
|
|
3
|
+
import { ScrollGrid } from './internal.esm.js';
|
|
4
|
+
import '@fullcalendar/core/internal';
|
|
5
|
+
import '@fullcalendar/core/preact';
|
|
6
|
+
|
|
7
|
+
var index = createPlugin({
|
|
8
|
+
name: '@fullcalendar/scrollgrid',
|
|
9
|
+
premiumReleaseDate: '2023-01-30',
|
|
10
|
+
deps: [premiumCommonPlugin],
|
|
11
|
+
scrollGridImpl: ScrollGrid,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { index as default };
|
package/index.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar ScrollGrid Plugin v6.0
|
|
2
|
+
FullCalendar ScrollGrid Plugin v6.1.0
|
|
3
3
|
Docs & License: https://fullcalendar.io/docs/premium
|
|
4
4
|
(c) 2022 Adam Shaw
|
|
5
5
|
*/
|
|
@@ -838,7 +838,7 @@ FullCalendar.ScrollGrid = (function (exports, core, premiumCommonPlugin, interna
|
|
|
838
838
|
|
|
839
839
|
var plugin = core.createPlugin({
|
|
840
840
|
name: '@fullcalendar/scrollgrid',
|
|
841
|
-
premiumReleaseDate: '
|
|
841
|
+
premiumReleaseDate: '2023-01-30',
|
|
842
842
|
deps: [premiumCommonPlugin__default["default"]],
|
|
843
843
|
scrollGridImpl: ScrollGrid,
|
|
844
844
|
});
|
package/index.global.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar ScrollGrid Plugin v6.0
|
|
2
|
+
FullCalendar ScrollGrid Plugin v6.1.0
|
|
3
3
|
Docs & License: https://fullcalendar.io/docs/premium
|
|
4
4
|
(c) 2022 Adam Shaw
|
|
5
5
|
*/
|
|
6
|
-
FullCalendar.ScrollGrid=function(e,t,l,s,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=r(l);function n(e){let t=e.scrollLeft;if("rtl"===window.getComputedStyle(e).direction)switch(a()){case"negative":t*=-1;case"reverse":t=e.scrollWidth-t-e.clientWidth}return t}function h(e,t){if("rtl"===window.getComputedStyle(e).direction)switch(a()){case"reverse":t=e.scrollWidth-t;break;case"negative":t=-(e.scrollWidth-t)}e.scrollLeft=t}let c;function a(){return c||(c=function(){let e,t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",t.style.width="1px",t.style.height="1px",t.style.overflow="scroll",t.style.direction="rtl",t.style.fontSize="100px",t.innerHTML="A",document.body.appendChild(t),t.scrollLeft>0?e="positive":(t.scrollLeft=1,e=t.scrollLeft>0?"reverse":"negative");return s.removeElement(t),e}())}class d{constructor(e,t){this.scrollEl=e,this.isRtl=t,this.updateSize=()=>{let{scrollEl:e}=this,t=s.findElements(e,".fc-sticky");!function(e,t,l){e.forEach((e,i)=>{let r,{textAlign:o,elWidth:n,parentBound:h}=t[i],c=h.right-h.left;r="center"===o&&c>l?(l-n)/2:"",s.applyStyle(e,{left:r,right:r,top:0})})}(t,this.queryElGeoms(t),e.clientWidth)}}queryElGeoms(e){let{scrollEl:t,isRtl:l}=this,i=function(e){let t=e.getBoundingClientRect(),l=s.computeEdges(e);return{left:t.left+l.borderLeft+l.scrollbarLeft-n(e),top:t.top+l.borderTop-e.scrollTop}}(t),r=[];for(let t of e){let e=s.translateRect(s.computeInnerRect(t.parentNode,!0,!0),-i.left,-i.top),o=t.getBoundingClientRect(),n=window.getComputedStyle(t),h=window.getComputedStyle(t.parentNode).textAlign,c=null;"start"===h?h=l?"right":"left":"end"===h&&(h=l?"left":"right"),"sticky"!==n.position&&(c=s.translateRect(o,-i.left-(parseFloat(n.left)||0),-i.top-(parseFloat(n.top)||0))),r.push({parentBound:e,naturalBound:c,elWidth:o.width,elHeight:o.height,textAlign:h})}return r}}class u extends s.BaseComponent{constructor(){super(...arguments),this.elRef=i.createRef(),this.state={xScrollbarWidth:0,yScrollbarWidth:0},this.handleScroller=e=>{this.scroller=e,s.setRef(this.props.scrollerRef,e)},this.handleSizing=()=>{let{props:e}=this;"scroll-hidden"===e.overflowY&&this.setState({yScrollbarWidth:this.scroller.getYScrollbarWidth()}),"scroll-hidden"===e.overflowX&&this.setState({xScrollbarWidth:this.scroller.getXScrollbarWidth()})}}render(){let{props:e,state:t,context:l}=this,r=l.isRtl&&s.getIsRtlScrollbarOnLeft(),o=0,n=0,h=0;return"scroll-hidden"===e.overflowX&&(h=t.xScrollbarWidth),"scroll-hidden"===e.overflowY&&null!=t.yScrollbarWidth&&(r?o=t.yScrollbarWidth:n=t.yScrollbarWidth),i.createElement("div",{ref:this.elRef,className:"fc-scroller-harness"+(e.liquid?" fc-scroller-harness-liquid":"")},i.createElement(s.Scroller,{ref:this.handleScroller,elRef:this.props.scrollerElRef,overflowX:"scroll-hidden"===e.overflowX?"scroll":e.overflowX,overflowY:"scroll-hidden"===e.overflowY?"scroll":e.overflowY,overcomeLeft:o,overcomeRight:n,overcomeBottom:h,maxHeight:"number"==typeof e.maxHeight?e.maxHeight+("scroll-hidden"===e.overflowX?t.xScrollbarWidth:0):"",liquid:e.liquid,liquidIsAbsolute:!0},e.children))}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(e){s.isPropsEqual(e,this.props)||this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}needsXScrolling(){return this.scroller.needsXScrolling()}needsYScrolling(){return this.scroller.needsYScrolling()}}const f="wheel mousewheel DomMouseScroll MozMousePixelScroll".split(" ");class g{constructor(e){this.el=e,this.emitter=new s.Emitter,this.isScrolling=!1,this.isTouching=!1,this.isRecentlyWheeled=!1,this.isRecentlyScrolled=!1,this.wheelWaiter=new s.DelayedRunner(this._handleWheelWaited.bind(this)),this.scrollWaiter=new s.DelayedRunner(this._handleScrollWaited.bind(this)),this.handleScroll=()=>{this.startScroll(),this.emitter.trigger("scroll",this.isRecentlyWheeled,this.isTouching),this.isRecentlyScrolled=!0,this.scrollWaiter.request(500)},this.handleWheel=()=>{this.isRecentlyWheeled=!0,this.wheelWaiter.request(500)},this.handleTouchStart=()=>{this.isTouching=!0},this.handleTouchEnd=()=>{this.isTouching=!1,this.isRecentlyScrolled||this.endScroll()},e.addEventListener("scroll",this.handleScroll),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.addEventListener("touchend",this.handleTouchEnd);for(let t of f)e.addEventListener(t,this.handleWheel)}destroy(){let{el:e}=this;e.removeEventListener("scroll",this.handleScroll),e.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.removeEventListener("touchend",this.handleTouchEnd);for(let t of f)e.removeEventListener(t,this.handleWheel)}startScroll(){this.isScrolling||(this.isScrolling=!0,this.emitter.trigger("scrollStart",this.isRecentlyWheeled,this.isTouching))}endScroll(){this.isScrolling&&(this.emitter.trigger("scrollEnd"),this.isScrolling=!1,this.isRecentlyScrolled=!0,this.isRecentlyWheeled=!1,this.scrollWaiter.clear(),this.wheelWaiter.clear())}_handleScrollWaited(){this.isRecentlyScrolled=!1,this.isTouching||this.endScroll()}_handleWheelWaited(){this.isRecentlyWheeled=!1}}class p{constructor(e,t){this.isVertical=e,this.scrollEls=t,this.isPaused=!1,this.scrollListeners=t.map(e=>this.bindScroller(e))}destroy(){for(let e of this.scrollListeners)e.destroy()}bindScroller(e){let{scrollEls:t,isVertical:l}=this,s=new g(e);return s.emitter.on("scroll",(s,i)=>{if(!this.isPaused&&((!this.masterEl||this.masterEl!==e&&(s||i))&&this.assignMaster(e),this.masterEl===e))for(let s of t)s!==e&&(l?s.scrollTop=e.scrollTop:s.scrollLeft=e.scrollLeft)}),s.emitter.on("scrollEnd",()=>{this.masterEl===e&&(this.masterEl=null)}),s}assignMaster(e){this.masterEl=e;for(let t of this.scrollListeners)t.el!==e&&t.endScroll()}forceScrollLeft(e){this.isPaused=!0;for(let t of this.scrollListeners)h(t.el,e);this.isPaused=!1}forceScrollTop(e){this.isPaused=!0;for(let t of this.scrollListeners)t.el.scrollTop=e;this.isPaused=!1}}s.config.SCROLLGRID_RESIZE_INTERVAL=500;class S extends s.BaseComponent{constructor(){super(...arguments),this.compileColGroupStats=s.memoizeArraylike(w,W),this.renderMicroColGroups=s.memoizeArraylike(s.renderMicroColGroup),this.clippedScrollerRefs=new s.RefMap,this.scrollerElRefs=new s.RefMap(this._handleScrollerEl.bind(this)),this.chunkElRefs=new s.RefMap(this._handleChunkEl.bind(this)),this.scrollSyncersBySection={},this.scrollSyncersByColumn={},this.rowUnstableMap=new Map,this.rowInnerMaxHeightMap=new Map,this.anyRowHeightsChanged=!1,this.recentSizingCnt=0,this.state={shrinkWidths:[],forceYScrollbars:!1,forceXScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{},sectionRowMaxHeights:[]},this.handleSizing=(e,t)=>{if(!this.allowSizing())return;t||(this.anyRowHeightsChanged=!0);let l={};(e||!t&&!this.rowUnstableMap.size)&&(l.sectionRowMaxHeights=this.computeSectionRowMaxHeights()),this.setState(Object.assign(Object.assign({shrinkWidths:this.computeShrinkWidths()},this.computeScrollerDims()),l),()=>{this.rowUnstableMap.size||this.updateStickyScrolling()})},this.handleRowHeightChange=(e,t)=>{let{rowUnstableMap:l,rowInnerMaxHeightMap:s}=this;if(t){l.delete(e);let t=y(e);s.has(e)&&s.get(e)===t||(s.set(e,t),this.anyRowHeightsChanged=!0),!l.size&&this.anyRowHeightsChanged&&(this.anyRowHeightsChanged=!1,this.setState({sectionRowMaxHeights:this.computeSectionRowMaxHeights()}))}else l.set(e,!0)}}render(){let{props:e,state:t,context:l}=this,{shrinkWidths:r}=t,o=this.compileColGroupStats(e.colGroups.map(e=>[e])),n=this.renderMicroColGroups(o.map((e,t)=>[e.cols,r[t]])),h=s.getScrollGridClassNames(e.liquid,l);this.getDims();let c,a=e.sections,d=a.length,u=0,f=[],g=[],p=[];for(;u<d&&"header"===(c=a[u]).type;)f.push(this.renderSection(c,u,o,n,t.sectionRowMaxHeights,!0)),u+=1;for(;u<d&&"body"===(c=a[u]).type;)g.push(this.renderSection(c,u,o,n,t.sectionRowMaxHeights,!1)),u+=1;for(;u<d&&"footer"===(c=a[u]).type;)p.push(this.renderSection(c,u,o,n,t.sectionRowMaxHeights,!0)),u+=1;const S=!s.getCanVGrowWithinCell(),m={role:"rowgroup"};return i.createElement("table",{ref:e.elRef,role:"grid",className:h.join(" ")},function(e,t){let l=e.map((e,l)=>{let r=e.width;return"shrink"===r&&(r=e.totalColWidth+s.sanitizeShrinkWidth(t[l])+1),i.createElement("col",{style:{width:r}})});return i.createElement("colgroup",{},...l)}(o,r),Boolean(!S&&f.length)&&i.createElement("thead",m,...f),Boolean(!S&&g.length)&&i.createElement("tbody",m,...g),Boolean(!S&&p.length)&&i.createElement("tfoot",m,...p),S&&i.createElement("tbody",m,...f,...g,...p))}renderSection(e,t,l,r,o,n){return"outerContent"in e?i.createElement(i.Fragment,{key:e.key},e.outerContent):i.createElement("tr",{key:e.key,role:"presentation",className:s.getSectionClassNames(e,this.props.liquid).join(" ")},e.chunks.map((s,i)=>this.renderChunk(e,t,l[i],r[i],s,i,(o[t]||[])[i]||[],n)))}renderChunk(e,t,l,r,o,n,h,c){if("outerContent"in o)return i.createElement(i.Fragment,{key:o.key},o.outerContent);let{state:a}=this,{scrollerClientWidths:d,scrollerClientHeights:f}=a,[g,p]=this.getDims(),S=t*p+n,m=n===(!this.context.isRtl||s.getIsRtlScrollbarOnLeft()?p-1:0),y=t===g-1,R=y&&a.forceXScrollbars,w=m&&a.forceYScrollbars,C=l&&l.allowXScrolling,E=s.getAllowYScrolling(this.props,e),W=s.getSectionHasLiquidHeight(this.props,e),b=e.expandRows&&W,M=l&&l.totalColMinWidth||"",k=s.renderChunkContent(e,o,{tableColGroupNode:r,tableMinWidth:M,clientWidth:void 0!==d[S]?d[S]:null,clientHeight:void 0!==f[S]?f[S]:null,expandRows:b,syncRowHeights:Boolean(e.syncRowHeights),rowSyncHeights:h,reportRowHeightChange:this.handleRowHeightChange},c),v=R?y?"scroll":"scroll-hidden":C?y?"auto":"scroll-hidden":"hidden",x=w?m?"scroll":"scroll-hidden":E?m?"auto":"scroll-hidden":"hidden";return k=i.createElement(u,{ref:this.clippedScrollerRefs.createRef(S),scrollerElRef:this.scrollerElRefs.createRef(S),overflowX:v,overflowY:x,liquid:W,maxHeight:e.maxHeight},k),i.createElement(c?"th":"td",{key:o.key,ref:this.chunkElRefs.createRef(S),role:"presentation"},k)}componentDidMount(){this.getStickyScrolling=s.memoizeArraylike(k),this.getScrollSyncersBySection=s.memoizeHashlike(b.bind(this,!0),null,M),this.getScrollSyncersByColumn=s.memoizeHashlike(b.bind(this,!1),null,M),this.updateScrollSyncers(),this.handleSizing(!1),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(e,t){this.updateScrollSyncers(),this.handleSizing(!1,t.sectionRowMaxHeights!==this.state.sectionRowMaxHeights)}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing),this.destroyScrollSyncers()}allowSizing(){let e=new Date;return!this.lastSizingDate||e.valueOf()>this.lastSizingDate.valueOf()+s.config.SCROLLGRID_RESIZE_INTERVAL?(this.lastSizingDate=e,this.recentSizingCnt=0,!0):(this.recentSizingCnt+=1)<=10}computeShrinkWidths(){let e=this.compileColGroupStats(this.props.colGroups.map(e=>[e])),[t,l]=this.getDims(),i=t*l,r=[];return e.forEach((e,t)=>{if(e.hasShrinkCol){let e=this.chunkElRefs.collect(t,i,l);r[t]=s.computeShrinkWidth(e)}}),r}computeSectionRowMaxHeights(){let e=new Map,[t,l]=this.getDims(),i=[];for(let r=0;r<t;r+=1){let t=this.props.sections[r],o=[];if(t&&t.syncRowHeights){let i=[];for(let t=0;t<l;t+=1){let o=r*l+t,n=[],h=this.chunkElRefs.currentMap[o];n=h?s.findElements(h,".fc-scrollgrid-sync-table tr").map(t=>{let l=y(t);return e.set(t,l),l}):[],i.push(n)}let n=i[0].length,h=!0;for(let e=1;e<l;e+=1){if(!(t.chunks[e]&&void 0!==t.chunks[e].outerContent)&&i[e].length!==n){h=!1;break}}if(h){for(let e=0;e<l;e+=1)o.push([]);for(let e=0;e<n;e+=1){let t=[];for(let s=0;s<l;s+=1){let l=i[s][e];null!=l&&t.push(l)}let s=Math.max(...t);for(let e=0;e<l;e+=1)o[e].push(s)}}else{let e=[];for(let t=0;t<l;t+=1)e.push(m(i[t])+i[t].length);let t=Math.max(...e);for(let e=0;e<l;e+=1){let l=i[e].length,s=t-l,r=Math.floor(s/l),n=s-r*(l-1),h=[],c=0;for(c<l&&(h.push(n),c+=1);c<l;)h.push(r),c+=1;o.push(h)}}}i.push(o)}return this.rowInnerMaxHeightMap=e,i}computeScrollerDims(){let e=s.getScrollbarWidths(),[t,l]=this.getDims(),i=!this.context.isRtl||s.getIsRtlScrollbarOnLeft()?l-1:0,r=t-1,o=this.clippedScrollerRefs.currentMap,n=this.scrollerElRefs.currentMap,h=!1,c=!1,a={},d={};for(let e=0;e<t;e+=1){let t=o[e*l+i];if(t&&t.needsYScrolling()){h=!0;break}}for(let e=0;e<l;e+=1){let t=o[r*l+e];if(t&&t.needsXScrolling()){c=!0;break}}for(let s=0;s<t;s+=1)for(let t=0;t<l;t+=1){let o=s*l+t,u=n[o];if(u){let l=u.parentNode;a[o]=Math.floor(l.getBoundingClientRect().width-(t===i&&h?e.y:0)),d[o]=Math.floor(l.getBoundingClientRect().height-(s===r&&c?e.x:0))}}return{forceYScrollbars:h,forceXScrollbars:c,scrollerClientWidths:a,scrollerClientHeights:d}}updateStickyScrolling(){let{isRtl:e}=this.context,t=this.scrollerElRefs.getAll().map(t=>[t,e]);this.getStickyScrolling(t).forEach(e=>e.updateSize())}updateScrollSyncers(){let[e,t]=this.getDims(),l=e*t,i={},r={},o=this.scrollerElRefs.currentMap;for(let l=0;l<e;l+=1){let e=l*t,r=e+t;i[l]=s.collectFromHash(o,e,r,1)}for(let e=0;e<t;e+=1)r[e]=this.scrollerElRefs.collect(e,l,t);this.scrollSyncersBySection=this.getScrollSyncersBySection(i),this.scrollSyncersByColumn=this.getScrollSyncersByColumn(r)}destroyScrollSyncers(){s.mapHash(this.scrollSyncersBySection,M),s.mapHash(this.scrollSyncersByColumn,M)}getChunkConfigByIndex(e){let t=this.getDims()[1],l=Math.floor(e/t),s=e%t,i=this.props.sections[l];return i&&i.chunks[s]}forceScrollLeft(e,t){let l=this.scrollSyncersByColumn[e];l&&l.forceScrollLeft(t)}forceScrollTop(e,t){let l=this.scrollSyncersBySection[e];l&&l.forceScrollTop(t)}_handleChunkEl(e,t){let l=this.getChunkConfigByIndex(parseInt(t,10));l&&s.setRef(l.elRef,e)}_handleScrollerEl(e,t){let l=this.getChunkConfigByIndex(parseInt(t,10));l&&s.setRef(l.scrollerElRef,e)}getDims(){let e=this.props.sections.length;return[e,e?this.props.sections[0].chunks.length:0]}}function m(e){let t=0;for(let l of e)t+=l;return t}function y(e){let t=s.findElements(e,".fc-scrollgrid-sync-inner").map(R);return t.length?Math.max(...t):0}function R(e){return e.offsetHeight}function w(e){let t=C(e.cols,"width"),l=C(e.cols,"minWidth"),i=s.hasShrinkWidth(e.cols);return{hasShrinkCol:i,totalColWidth:t,totalColMinWidth:l,allowXScrolling:"shrink"!==e.width&&Boolean(t||l||i),cols:e.cols,width:e.width}}function C(e,t){let l=0;for(let s of e){let e=s[t];"number"==typeof e&&(l+=e*(s.span||1))}return l}S.addStateEquality({shrinkWidths:s.isArraysEqual,scrollerClientWidths:s.isPropsEqual,scrollerClientHeights:s.isPropsEqual});const E={cols:s.isColPropsEqual};function W(e,t){return s.compareObjs(e,t,E)}function b(e,...t){return new p(e,t)}function M(e){e.destroy()}function k(e,t){return new d(e,t)}var v=t.createPlugin({name:"@fullcalendar/scrollgrid",premiumReleaseDate:"2022-12-27",deps:[o.default],scrollGridImpl:S}),x={__proto__:null,ScrollGrid:S};return t.globalPlugins.push(v),e.Internal=x,e.default=v,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Internal,FullCalendar.Preact);
|
|
6
|
+
FullCalendar.ScrollGrid=function(e,t,l,s,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=r(l);function n(e){let t=e.scrollLeft;if("rtl"===window.getComputedStyle(e).direction)switch(a()){case"negative":t*=-1;case"reverse":t=e.scrollWidth-t-e.clientWidth}return t}function h(e,t){if("rtl"===window.getComputedStyle(e).direction)switch(a()){case"reverse":t=e.scrollWidth-t;break;case"negative":t=-(e.scrollWidth-t)}e.scrollLeft=t}let c;function a(){return c||(c=function(){let e,t=document.createElement("div");t.style.position="absolute",t.style.top="-1000px",t.style.width="1px",t.style.height="1px",t.style.overflow="scroll",t.style.direction="rtl",t.style.fontSize="100px",t.innerHTML="A",document.body.appendChild(t),t.scrollLeft>0?e="positive":(t.scrollLeft=1,e=t.scrollLeft>0?"reverse":"negative");return s.removeElement(t),e}())}class d{constructor(e,t){this.scrollEl=e,this.isRtl=t,this.updateSize=()=>{let{scrollEl:e}=this,t=s.findElements(e,".fc-sticky");!function(e,t,l){e.forEach((e,i)=>{let r,{textAlign:o,elWidth:n,parentBound:h}=t[i],c=h.right-h.left;r="center"===o&&c>l?(l-n)/2:"",s.applyStyle(e,{left:r,right:r,top:0})})}(t,this.queryElGeoms(t),e.clientWidth)}}queryElGeoms(e){let{scrollEl:t,isRtl:l}=this,i=function(e){let t=e.getBoundingClientRect(),l=s.computeEdges(e);return{left:t.left+l.borderLeft+l.scrollbarLeft-n(e),top:t.top+l.borderTop-e.scrollTop}}(t),r=[];for(let t of e){let e=s.translateRect(s.computeInnerRect(t.parentNode,!0,!0),-i.left,-i.top),o=t.getBoundingClientRect(),n=window.getComputedStyle(t),h=window.getComputedStyle(t.parentNode).textAlign,c=null;"start"===h?h=l?"right":"left":"end"===h&&(h=l?"left":"right"),"sticky"!==n.position&&(c=s.translateRect(o,-i.left-(parseFloat(n.left)||0),-i.top-(parseFloat(n.top)||0))),r.push({parentBound:e,naturalBound:c,elWidth:o.width,elHeight:o.height,textAlign:h})}return r}}class u extends s.BaseComponent{constructor(){super(...arguments),this.elRef=i.createRef(),this.state={xScrollbarWidth:0,yScrollbarWidth:0},this.handleScroller=e=>{this.scroller=e,s.setRef(this.props.scrollerRef,e)},this.handleSizing=()=>{let{props:e}=this;"scroll-hidden"===e.overflowY&&this.setState({yScrollbarWidth:this.scroller.getYScrollbarWidth()}),"scroll-hidden"===e.overflowX&&this.setState({xScrollbarWidth:this.scroller.getXScrollbarWidth()})}}render(){let{props:e,state:t,context:l}=this,r=l.isRtl&&s.getIsRtlScrollbarOnLeft(),o=0,n=0,h=0;return"scroll-hidden"===e.overflowX&&(h=t.xScrollbarWidth),"scroll-hidden"===e.overflowY&&null!=t.yScrollbarWidth&&(r?o=t.yScrollbarWidth:n=t.yScrollbarWidth),i.createElement("div",{ref:this.elRef,className:"fc-scroller-harness"+(e.liquid?" fc-scroller-harness-liquid":"")},i.createElement(s.Scroller,{ref:this.handleScroller,elRef:this.props.scrollerElRef,overflowX:"scroll-hidden"===e.overflowX?"scroll":e.overflowX,overflowY:"scroll-hidden"===e.overflowY?"scroll":e.overflowY,overcomeLeft:o,overcomeRight:n,overcomeBottom:h,maxHeight:"number"==typeof e.maxHeight?e.maxHeight+("scroll-hidden"===e.overflowX?t.xScrollbarWidth:0):"",liquid:e.liquid,liquidIsAbsolute:!0},e.children))}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(e){s.isPropsEqual(e,this.props)||this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}needsXScrolling(){return this.scroller.needsXScrolling()}needsYScrolling(){return this.scroller.needsYScrolling()}}const f="wheel mousewheel DomMouseScroll MozMousePixelScroll".split(" ");class g{constructor(e){this.el=e,this.emitter=new s.Emitter,this.isScrolling=!1,this.isTouching=!1,this.isRecentlyWheeled=!1,this.isRecentlyScrolled=!1,this.wheelWaiter=new s.DelayedRunner(this._handleWheelWaited.bind(this)),this.scrollWaiter=new s.DelayedRunner(this._handleScrollWaited.bind(this)),this.handleScroll=()=>{this.startScroll(),this.emitter.trigger("scroll",this.isRecentlyWheeled,this.isTouching),this.isRecentlyScrolled=!0,this.scrollWaiter.request(500)},this.handleWheel=()=>{this.isRecentlyWheeled=!0,this.wheelWaiter.request(500)},this.handleTouchStart=()=>{this.isTouching=!0},this.handleTouchEnd=()=>{this.isTouching=!1,this.isRecentlyScrolled||this.endScroll()},e.addEventListener("scroll",this.handleScroll),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.addEventListener("touchend",this.handleTouchEnd);for(let t of f)e.addEventListener(t,this.handleWheel)}destroy(){let{el:e}=this;e.removeEventListener("scroll",this.handleScroll),e.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),e.removeEventListener("touchend",this.handleTouchEnd);for(let t of f)e.removeEventListener(t,this.handleWheel)}startScroll(){this.isScrolling||(this.isScrolling=!0,this.emitter.trigger("scrollStart",this.isRecentlyWheeled,this.isTouching))}endScroll(){this.isScrolling&&(this.emitter.trigger("scrollEnd"),this.isScrolling=!1,this.isRecentlyScrolled=!0,this.isRecentlyWheeled=!1,this.scrollWaiter.clear(),this.wheelWaiter.clear())}_handleScrollWaited(){this.isRecentlyScrolled=!1,this.isTouching||this.endScroll()}_handleWheelWaited(){this.isRecentlyWheeled=!1}}class p{constructor(e,t){this.isVertical=e,this.scrollEls=t,this.isPaused=!1,this.scrollListeners=t.map(e=>this.bindScroller(e))}destroy(){for(let e of this.scrollListeners)e.destroy()}bindScroller(e){let{scrollEls:t,isVertical:l}=this,s=new g(e);return s.emitter.on("scroll",(s,i)=>{if(!this.isPaused&&((!this.masterEl||this.masterEl!==e&&(s||i))&&this.assignMaster(e),this.masterEl===e))for(let s of t)s!==e&&(l?s.scrollTop=e.scrollTop:s.scrollLeft=e.scrollLeft)}),s.emitter.on("scrollEnd",()=>{this.masterEl===e&&(this.masterEl=null)}),s}assignMaster(e){this.masterEl=e;for(let t of this.scrollListeners)t.el!==e&&t.endScroll()}forceScrollLeft(e){this.isPaused=!0;for(let t of this.scrollListeners)h(t.el,e);this.isPaused=!1}forceScrollTop(e){this.isPaused=!0;for(let t of this.scrollListeners)t.el.scrollTop=e;this.isPaused=!1}}s.config.SCROLLGRID_RESIZE_INTERVAL=500;class S extends s.BaseComponent{constructor(){super(...arguments),this.compileColGroupStats=s.memoizeArraylike(w,W),this.renderMicroColGroups=s.memoizeArraylike(s.renderMicroColGroup),this.clippedScrollerRefs=new s.RefMap,this.scrollerElRefs=new s.RefMap(this._handleScrollerEl.bind(this)),this.chunkElRefs=new s.RefMap(this._handleChunkEl.bind(this)),this.scrollSyncersBySection={},this.scrollSyncersByColumn={},this.rowUnstableMap=new Map,this.rowInnerMaxHeightMap=new Map,this.anyRowHeightsChanged=!1,this.recentSizingCnt=0,this.state={shrinkWidths:[],forceYScrollbars:!1,forceXScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{},sectionRowMaxHeights:[]},this.handleSizing=(e,t)=>{if(!this.allowSizing())return;t||(this.anyRowHeightsChanged=!0);let l={};(e||!t&&!this.rowUnstableMap.size)&&(l.sectionRowMaxHeights=this.computeSectionRowMaxHeights()),this.setState(Object.assign(Object.assign({shrinkWidths:this.computeShrinkWidths()},this.computeScrollerDims()),l),()=>{this.rowUnstableMap.size||this.updateStickyScrolling()})},this.handleRowHeightChange=(e,t)=>{let{rowUnstableMap:l,rowInnerMaxHeightMap:s}=this;if(t){l.delete(e);let t=y(e);s.has(e)&&s.get(e)===t||(s.set(e,t),this.anyRowHeightsChanged=!0),!l.size&&this.anyRowHeightsChanged&&(this.anyRowHeightsChanged=!1,this.setState({sectionRowMaxHeights:this.computeSectionRowMaxHeights()}))}else l.set(e,!0)}}render(){let{props:e,state:t,context:l}=this,{shrinkWidths:r}=t,o=this.compileColGroupStats(e.colGroups.map(e=>[e])),n=this.renderMicroColGroups(o.map((e,t)=>[e.cols,r[t]])),h=s.getScrollGridClassNames(e.liquid,l);this.getDims();let c,a=e.sections,d=a.length,u=0,f=[],g=[],p=[];for(;u<d&&"header"===(c=a[u]).type;)f.push(this.renderSection(c,u,o,n,t.sectionRowMaxHeights,!0)),u+=1;for(;u<d&&"body"===(c=a[u]).type;)g.push(this.renderSection(c,u,o,n,t.sectionRowMaxHeights,!1)),u+=1;for(;u<d&&"footer"===(c=a[u]).type;)p.push(this.renderSection(c,u,o,n,t.sectionRowMaxHeights,!0)),u+=1;const S=!s.getCanVGrowWithinCell(),m={role:"rowgroup"};return i.createElement("table",{ref:e.elRef,role:"grid",className:h.join(" ")},function(e,t){let l=e.map((e,l)=>{let r=e.width;return"shrink"===r&&(r=e.totalColWidth+s.sanitizeShrinkWidth(t[l])+1),i.createElement("col",{style:{width:r}})});return i.createElement("colgroup",{},...l)}(o,r),Boolean(!S&&f.length)&&i.createElement("thead",m,...f),Boolean(!S&&g.length)&&i.createElement("tbody",m,...g),Boolean(!S&&p.length)&&i.createElement("tfoot",m,...p),S&&i.createElement("tbody",m,...f,...g,...p))}renderSection(e,t,l,r,o,n){return"outerContent"in e?i.createElement(i.Fragment,{key:e.key},e.outerContent):i.createElement("tr",{key:e.key,role:"presentation",className:s.getSectionClassNames(e,this.props.liquid).join(" ")},e.chunks.map((s,i)=>this.renderChunk(e,t,l[i],r[i],s,i,(o[t]||[])[i]||[],n)))}renderChunk(e,t,l,r,o,n,h,c){if("outerContent"in o)return i.createElement(i.Fragment,{key:o.key},o.outerContent);let{state:a}=this,{scrollerClientWidths:d,scrollerClientHeights:f}=a,[g,p]=this.getDims(),S=t*p+n,m=n===(!this.context.isRtl||s.getIsRtlScrollbarOnLeft()?p-1:0),y=t===g-1,R=y&&a.forceXScrollbars,w=m&&a.forceYScrollbars,C=l&&l.allowXScrolling,E=s.getAllowYScrolling(this.props,e),W=s.getSectionHasLiquidHeight(this.props,e),b=e.expandRows&&W,M=l&&l.totalColMinWidth||"",k=s.renderChunkContent(e,o,{tableColGroupNode:r,tableMinWidth:M,clientWidth:void 0!==d[S]?d[S]:null,clientHeight:void 0!==f[S]?f[S]:null,expandRows:b,syncRowHeights:Boolean(e.syncRowHeights),rowSyncHeights:h,reportRowHeightChange:this.handleRowHeightChange},c),v=R?y?"scroll":"scroll-hidden":C?y?"auto":"scroll-hidden":"hidden",x=w?m?"scroll":"scroll-hidden":E?m?"auto":"scroll-hidden":"hidden";return k=i.createElement(u,{ref:this.clippedScrollerRefs.createRef(S),scrollerElRef:this.scrollerElRefs.createRef(S),overflowX:v,overflowY:x,liquid:W,maxHeight:e.maxHeight},k),i.createElement(c?"th":"td",{key:o.key,ref:this.chunkElRefs.createRef(S),role:"presentation"},k)}componentDidMount(){this.getStickyScrolling=s.memoizeArraylike(k),this.getScrollSyncersBySection=s.memoizeHashlike(b.bind(this,!0),null,M),this.getScrollSyncersByColumn=s.memoizeHashlike(b.bind(this,!1),null,M),this.updateScrollSyncers(),this.handleSizing(!1),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(e,t){this.updateScrollSyncers(),this.handleSizing(!1,t.sectionRowMaxHeights!==this.state.sectionRowMaxHeights)}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing),this.destroyScrollSyncers()}allowSizing(){let e=new Date;return!this.lastSizingDate||e.valueOf()>this.lastSizingDate.valueOf()+s.config.SCROLLGRID_RESIZE_INTERVAL?(this.lastSizingDate=e,this.recentSizingCnt=0,!0):(this.recentSizingCnt+=1)<=10}computeShrinkWidths(){let e=this.compileColGroupStats(this.props.colGroups.map(e=>[e])),[t,l]=this.getDims(),i=t*l,r=[];return e.forEach((e,t)=>{if(e.hasShrinkCol){let e=this.chunkElRefs.collect(t,i,l);r[t]=s.computeShrinkWidth(e)}}),r}computeSectionRowMaxHeights(){let e=new Map,[t,l]=this.getDims(),i=[];for(let r=0;r<t;r+=1){let t=this.props.sections[r],o=[];if(t&&t.syncRowHeights){let i=[];for(let t=0;t<l;t+=1){let o=r*l+t,n=[],h=this.chunkElRefs.currentMap[o];n=h?s.findElements(h,".fc-scrollgrid-sync-table tr").map(t=>{let l=y(t);return e.set(t,l),l}):[],i.push(n)}let n=i[0].length,h=!0;for(let e=1;e<l;e+=1){if(!(t.chunks[e]&&void 0!==t.chunks[e].outerContent)&&i[e].length!==n){h=!1;break}}if(h){for(let e=0;e<l;e+=1)o.push([]);for(let e=0;e<n;e+=1){let t=[];for(let s=0;s<l;s+=1){let l=i[s][e];null!=l&&t.push(l)}let s=Math.max(...t);for(let e=0;e<l;e+=1)o[e].push(s)}}else{let e=[];for(let t=0;t<l;t+=1)e.push(m(i[t])+i[t].length);let t=Math.max(...e);for(let e=0;e<l;e+=1){let l=i[e].length,s=t-l,r=Math.floor(s/l),n=s-r*(l-1),h=[],c=0;for(c<l&&(h.push(n),c+=1);c<l;)h.push(r),c+=1;o.push(h)}}}i.push(o)}return this.rowInnerMaxHeightMap=e,i}computeScrollerDims(){let e=s.getScrollbarWidths(),[t,l]=this.getDims(),i=!this.context.isRtl||s.getIsRtlScrollbarOnLeft()?l-1:0,r=t-1,o=this.clippedScrollerRefs.currentMap,n=this.scrollerElRefs.currentMap,h=!1,c=!1,a={},d={};for(let e=0;e<t;e+=1){let t=o[e*l+i];if(t&&t.needsYScrolling()){h=!0;break}}for(let e=0;e<l;e+=1){let t=o[r*l+e];if(t&&t.needsXScrolling()){c=!0;break}}for(let s=0;s<t;s+=1)for(let t=0;t<l;t+=1){let o=s*l+t,u=n[o];if(u){let l=u.parentNode;a[o]=Math.floor(l.getBoundingClientRect().width-(t===i&&h?e.y:0)),d[o]=Math.floor(l.getBoundingClientRect().height-(s===r&&c?e.x:0))}}return{forceYScrollbars:h,forceXScrollbars:c,scrollerClientWidths:a,scrollerClientHeights:d}}updateStickyScrolling(){let{isRtl:e}=this.context,t=this.scrollerElRefs.getAll().map(t=>[t,e]);this.getStickyScrolling(t).forEach(e=>e.updateSize())}updateScrollSyncers(){let[e,t]=this.getDims(),l=e*t,i={},r={},o=this.scrollerElRefs.currentMap;for(let l=0;l<e;l+=1){let e=l*t,r=e+t;i[l]=s.collectFromHash(o,e,r,1)}for(let e=0;e<t;e+=1)r[e]=this.scrollerElRefs.collect(e,l,t);this.scrollSyncersBySection=this.getScrollSyncersBySection(i),this.scrollSyncersByColumn=this.getScrollSyncersByColumn(r)}destroyScrollSyncers(){s.mapHash(this.scrollSyncersBySection,M),s.mapHash(this.scrollSyncersByColumn,M)}getChunkConfigByIndex(e){let t=this.getDims()[1],l=Math.floor(e/t),s=e%t,i=this.props.sections[l];return i&&i.chunks[s]}forceScrollLeft(e,t){let l=this.scrollSyncersByColumn[e];l&&l.forceScrollLeft(t)}forceScrollTop(e,t){let l=this.scrollSyncersBySection[e];l&&l.forceScrollTop(t)}_handleChunkEl(e,t){let l=this.getChunkConfigByIndex(parseInt(t,10));l&&s.setRef(l.elRef,e)}_handleScrollerEl(e,t){let l=this.getChunkConfigByIndex(parseInt(t,10));l&&s.setRef(l.scrollerElRef,e)}getDims(){let e=this.props.sections.length;return[e,e?this.props.sections[0].chunks.length:0]}}function m(e){let t=0;for(let l of e)t+=l;return t}function y(e){let t=s.findElements(e,".fc-scrollgrid-sync-inner").map(R);return t.length?Math.max(...t):0}function R(e){return e.offsetHeight}function w(e){let t=C(e.cols,"width"),l=C(e.cols,"minWidth"),i=s.hasShrinkWidth(e.cols);return{hasShrinkCol:i,totalColWidth:t,totalColMinWidth:l,allowXScrolling:"shrink"!==e.width&&Boolean(t||l||i),cols:e.cols,width:e.width}}function C(e,t){let l=0;for(let s of e){let e=s[t];"number"==typeof e&&(l+=e*(s.span||1))}return l}S.addStateEquality({shrinkWidths:s.isArraysEqual,scrollerClientWidths:s.isPropsEqual,scrollerClientHeights:s.isPropsEqual});const E={cols:s.isColPropsEqual};function W(e,t){return s.compareObjs(e,t,E)}function b(e,...t){return new p(e,t)}function M(e){e.destroy()}function k(e,t){return new d(e,t)}var v=t.createPlugin({name:"@fullcalendar/scrollgrid",premiumReleaseDate:"2023-01-30",deps:[o.default],scrollGridImpl:S}),x={__proto__:null,ScrollGrid:S};return t.globalPlugins.push(v),e.Internal=x,e.default=v,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Internal,FullCalendar.Preact);
|
package/index.js
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import premiumCommonPlugin from '@fullcalendar/premium-common/index.js';
|
|
3
|
-
import { ScrollGrid } from './internal.js';
|
|
4
|
-
import '@fullcalendar/core/internal.js';
|
|
5
|
-
import '@fullcalendar/core/preact.js';
|
|
1
|
+
'use strict';
|
|
6
2
|
|
|
7
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@fullcalendar/core');
|
|
6
|
+
var premiumCommonPlugin = require('@fullcalendar/premium-common');
|
|
7
|
+
var internalCommon = require('./internal.js');
|
|
8
|
+
require('@fullcalendar/core/internal');
|
|
9
|
+
require('@fullcalendar/core/preact');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
+
|
|
13
|
+
var premiumCommonPlugin__default = /*#__PURE__*/_interopDefaultLegacy(premiumCommonPlugin);
|
|
14
|
+
|
|
15
|
+
var index = core.createPlugin({
|
|
8
16
|
name: '@fullcalendar/scrollgrid',
|
|
9
|
-
premiumReleaseDate: '
|
|
10
|
-
deps: [
|
|
11
|
-
scrollGridImpl: ScrollGrid,
|
|
17
|
+
premiumReleaseDate: '2023-01-30',
|
|
18
|
+
deps: [premiumCommonPlugin__default["default"]],
|
|
19
|
+
scrollGridImpl: internalCommon.ScrollGrid,
|
|
12
20
|
});
|
|
13
21
|
|
|
14
|
-
|
|
22
|
+
exports["default"] = index;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var internal_cjs = require('@fullcalendar/core/internal.cjs');
|
|
6
|
-
var preact_cjs = require('@fullcalendar/core/preact.cjs');
|
|
1
|
+
import { computeEdges, removeElement, findElements, translateRect, computeInnerRect, applyStyle, BaseComponent, setRef, getIsRtlScrollbarOnLeft, Scroller, isPropsEqual, Emitter, DelayedRunner, config, memoizeArraylike, renderMicroColGroup, RefMap, getScrollGridClassNames, getCanVGrowWithinCell, getSectionClassNames, getAllowYScrolling, getSectionHasLiquidHeight, renderChunkContent, memoizeHashlike, computeShrinkWidth, getScrollbarWidths, collectFromHash, mapHash, isArraysEqual, sanitizeShrinkWidth, hasShrinkWidth, compareObjs, isColPropsEqual } from '@fullcalendar/core/internal';
|
|
2
|
+
import { createRef, createElement, Fragment } from '@fullcalendar/core/preact';
|
|
7
3
|
|
|
8
4
|
// TODO: assume the el has no borders?
|
|
9
5
|
function getScrollCanvasOrigin(scrollEl) {
|
|
10
6
|
let rect = scrollEl.getBoundingClientRect();
|
|
11
|
-
let edges =
|
|
7
|
+
let edges = computeEdges(scrollEl); // TODO: pass in isRtl?
|
|
12
8
|
return {
|
|
13
9
|
left: rect.left + edges.borderLeft + edges.scrollbarLeft - getScrollFromLeftEdge(scrollEl),
|
|
14
10
|
top: rect.top + edges.borderTop - scrollEl.scrollTop,
|
|
@@ -71,7 +67,7 @@ function detectRtlScrollSystem() {
|
|
|
71
67
|
system = 'negative'; // scroll is a negative number from the right edge
|
|
72
68
|
}
|
|
73
69
|
}
|
|
74
|
-
|
|
70
|
+
removeElement(el);
|
|
75
71
|
return system;
|
|
76
72
|
}
|
|
77
73
|
|
|
@@ -90,7 +86,7 @@ class StickyScrolling {
|
|
|
90
86
|
this.isRtl = isRtl;
|
|
91
87
|
this.updateSize = () => {
|
|
92
88
|
let { scrollEl } = this;
|
|
93
|
-
let els =
|
|
89
|
+
let els = findElements(scrollEl, STICKY_SELECTOR);
|
|
94
90
|
let elGeoms = this.queryElGeoms(els);
|
|
95
91
|
let viewportWidth = scrollEl.clientWidth;
|
|
96
92
|
assignStickyPositions(els, elGeoms, viewportWidth);
|
|
@@ -101,7 +97,7 @@ class StickyScrolling {
|
|
|
101
97
|
let canvasOrigin = getScrollCanvasOrigin(scrollEl);
|
|
102
98
|
let elGeoms = [];
|
|
103
99
|
for (let el of els) {
|
|
104
|
-
let parentBound =
|
|
100
|
+
let parentBound = translateRect(computeInnerRect(el.parentNode, true, true), // weird way to call this!!!
|
|
105
101
|
-canvasOrigin.left, -canvasOrigin.top);
|
|
106
102
|
let elRect = el.getBoundingClientRect();
|
|
107
103
|
let computedStyles = window.getComputedStyle(el);
|
|
@@ -114,7 +110,7 @@ class StickyScrolling {
|
|
|
114
110
|
textAlign = isRtl ? 'left' : 'right';
|
|
115
111
|
}
|
|
116
112
|
if (computedStyles.position !== 'sticky') {
|
|
117
|
-
naturalBound =
|
|
113
|
+
naturalBound = translateRect(elRect, -canvasOrigin.left - (parseFloat(computedStyles.left) || 0), // could be 'auto'
|
|
118
114
|
-canvasOrigin.top - (parseFloat(computedStyles.top) || 0));
|
|
119
115
|
}
|
|
120
116
|
elGeoms.push({
|
|
@@ -140,7 +136,7 @@ function assignStickyPositions(els, elGeoms, viewportWidth) {
|
|
|
140
136
|
else { // if parent container can be completely in view, we don't need stickiness
|
|
141
137
|
left = '';
|
|
142
138
|
}
|
|
143
|
-
|
|
139
|
+
applyStyle(el, {
|
|
144
140
|
left,
|
|
145
141
|
right: left,
|
|
146
142
|
top: 0,
|
|
@@ -148,17 +144,17 @@ function assignStickyPositions(els, elGeoms, viewportWidth) {
|
|
|
148
144
|
});
|
|
149
145
|
}
|
|
150
146
|
|
|
151
|
-
class ClippedScroller extends
|
|
147
|
+
class ClippedScroller extends BaseComponent {
|
|
152
148
|
constructor() {
|
|
153
149
|
super(...arguments);
|
|
154
|
-
this.elRef =
|
|
150
|
+
this.elRef = createRef();
|
|
155
151
|
this.state = {
|
|
156
152
|
xScrollbarWidth: 0,
|
|
157
153
|
yScrollbarWidth: 0,
|
|
158
154
|
};
|
|
159
155
|
this.handleScroller = (scroller) => {
|
|
160
156
|
this.scroller = scroller;
|
|
161
|
-
|
|
157
|
+
setRef(this.props.scrollerRef, scroller);
|
|
162
158
|
};
|
|
163
159
|
this.handleSizing = () => {
|
|
164
160
|
let { props } = this;
|
|
@@ -172,7 +168,7 @@ class ClippedScroller extends internal_cjs.BaseComponent {
|
|
|
172
168
|
}
|
|
173
169
|
render() {
|
|
174
170
|
let { props, state, context } = this;
|
|
175
|
-
let isScrollbarOnLeft = context.isRtl &&
|
|
171
|
+
let isScrollbarOnLeft = context.isRtl && getIsRtlScrollbarOnLeft();
|
|
176
172
|
let overcomeLeft = 0;
|
|
177
173
|
let overcomeRight = 0;
|
|
178
174
|
let overcomeBottom = 0;
|
|
@@ -189,8 +185,8 @@ class ClippedScroller extends internal_cjs.BaseComponent {
|
|
|
189
185
|
}
|
|
190
186
|
}
|
|
191
187
|
}
|
|
192
|
-
return (
|
|
193
|
-
|
|
188
|
+
return (createElement("div", { ref: this.elRef, className: 'fc-scroller-harness' + (props.liquid ? ' fc-scroller-harness-liquid' : '') },
|
|
189
|
+
createElement(Scroller, { ref: this.handleScroller, elRef: this.props.scrollerElRef, overflowX: props.overflowX === 'scroll-hidden' ? 'scroll' : props.overflowX, overflowY: props.overflowY === 'scroll-hidden' ? 'scroll' : props.overflowY, overcomeLeft: overcomeLeft, overcomeRight: overcomeRight, overcomeBottom: overcomeBottom, maxHeight: typeof props.maxHeight === 'number'
|
|
194
190
|
? (props.maxHeight + (props.overflowX === 'scroll-hidden' ? state.xScrollbarWidth : 0))
|
|
195
191
|
: '', liquid: props.liquid, liquidIsAbsolute: true }, props.children)));
|
|
196
192
|
}
|
|
@@ -199,7 +195,7 @@ class ClippedScroller extends internal_cjs.BaseComponent {
|
|
|
199
195
|
this.context.addResizeHandler(this.handleSizing);
|
|
200
196
|
}
|
|
201
197
|
componentDidUpdate(prevProps) {
|
|
202
|
-
if (!
|
|
198
|
+
if (!isPropsEqual(prevProps, this.props)) { // an external change?
|
|
203
199
|
this.handleSizing();
|
|
204
200
|
}
|
|
205
201
|
}
|
|
@@ -221,13 +217,13 @@ ALSO, with the ability to disable touch
|
|
|
221
217
|
class ScrollListener {
|
|
222
218
|
constructor(el) {
|
|
223
219
|
this.el = el;
|
|
224
|
-
this.emitter = new
|
|
220
|
+
this.emitter = new Emitter();
|
|
225
221
|
this.isScrolling = false;
|
|
226
222
|
this.isTouching = false; // user currently has finger down?
|
|
227
223
|
this.isRecentlyWheeled = false;
|
|
228
224
|
this.isRecentlyScrolled = false;
|
|
229
|
-
this.wheelWaiter = new
|
|
230
|
-
this.scrollWaiter = new
|
|
225
|
+
this.wheelWaiter = new DelayedRunner(this._handleWheelWaited.bind(this));
|
|
226
|
+
this.scrollWaiter = new DelayedRunner(this._handleScrollWaited.bind(this));
|
|
231
227
|
// Handlers
|
|
232
228
|
// ----------------------------------------------------------------------------------------------
|
|
233
229
|
this.handleScroll = () => {
|
|
@@ -370,20 +366,20 @@ class ScrollSyncer {
|
|
|
370
366
|
}
|
|
371
367
|
}
|
|
372
368
|
|
|
373
|
-
|
|
369
|
+
config.SCROLLGRID_RESIZE_INTERVAL = 500;
|
|
374
370
|
/*
|
|
375
371
|
TODO: make <ScrollGridSection> subcomponent
|
|
376
372
|
NOTE: doesn't support collapsibleWidth (which is sortof a hack anyway)
|
|
377
373
|
*/
|
|
378
|
-
class ScrollGrid extends
|
|
374
|
+
class ScrollGrid extends BaseComponent {
|
|
379
375
|
constructor() {
|
|
380
376
|
super(...arguments);
|
|
381
|
-
this.compileColGroupStats =
|
|
382
|
-
this.renderMicroColGroups =
|
|
383
|
-
this.clippedScrollerRefs = new
|
|
377
|
+
this.compileColGroupStats = memoizeArraylike(compileColGroupStat, isColGroupStatsEqual);
|
|
378
|
+
this.renderMicroColGroups = memoizeArraylike(renderMicroColGroup); // yucky to memoize VNodes, but much more efficient for consumers
|
|
379
|
+
this.clippedScrollerRefs = new RefMap();
|
|
384
380
|
// doesn't hold non-scrolling els used just for padding
|
|
385
|
-
this.scrollerElRefs = new
|
|
386
|
-
this.chunkElRefs = new
|
|
381
|
+
this.scrollerElRefs = new RefMap(this._handleScrollerEl.bind(this));
|
|
382
|
+
this.chunkElRefs = new RefMap(this._handleChunkEl.bind(this));
|
|
387
383
|
this.scrollSyncersBySection = {};
|
|
388
384
|
this.scrollSyncersByColumn = {};
|
|
389
385
|
// for row-height-syncing
|
|
@@ -443,7 +439,7 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
443
439
|
let { shrinkWidths } = state;
|
|
444
440
|
let colGroupStats = this.compileColGroupStats(props.colGroups.map((colGroup) => [colGroup]));
|
|
445
441
|
let microColGroupNodes = this.renderMicroColGroups(colGroupStats.map((stat, i) => [stat.cols, shrinkWidths[i]]));
|
|
446
|
-
let classNames =
|
|
442
|
+
let classNames = getScrollGridClassNames(props.liquid, context);
|
|
447
443
|
this.getDims();
|
|
448
444
|
// TODO: make DRY
|
|
449
445
|
let sectionConfigs = props.sections;
|
|
@@ -465,39 +461,39 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
465
461
|
footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, true));
|
|
466
462
|
configI += 1;
|
|
467
463
|
}
|
|
468
|
-
const isBuggy = !
|
|
464
|
+
const isBuggy = !getCanVGrowWithinCell(); // see NOTE in SimpleScrollGrid
|
|
469
465
|
const roleAttrs = { role: 'rowgroup' };
|
|
470
|
-
return
|
|
466
|
+
return createElement('table', {
|
|
471
467
|
ref: props.elRef,
|
|
472
468
|
role: 'grid',
|
|
473
469
|
className: classNames.join(' '),
|
|
474
|
-
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) &&
|
|
470
|
+
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && createElement('thead', roleAttrs, ...headSectionNodes), Boolean(!isBuggy && bodySectionNodes.length) && createElement('tbody', roleAttrs, ...bodySectionNodes), Boolean(!isBuggy && footSectionNodes.length) && createElement('tfoot', roleAttrs, ...footSectionNodes), isBuggy && createElement('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes));
|
|
475
471
|
}
|
|
476
472
|
renderSection(sectionConfig, sectionIndex, colGroupStats, microColGroupNodes, sectionRowMaxHeights, isHeader) {
|
|
477
473
|
if ('outerContent' in sectionConfig) {
|
|
478
|
-
return (
|
|
474
|
+
return (createElement(Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));
|
|
479
475
|
}
|
|
480
|
-
return (
|
|
476
|
+
return (createElement("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map((chunkConfig, i) => this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || [], isHeader))));
|
|
481
477
|
}
|
|
482
478
|
renderChunk(sectionConfig, sectionIndex, colGroupStat, microColGroupNode, chunkConfig, chunkIndex, rowHeights, isHeader) {
|
|
483
479
|
if ('outerContent' in chunkConfig) {
|
|
484
|
-
return (
|
|
480
|
+
return (createElement(Fragment, { key: chunkConfig.key }, chunkConfig.outerContent));
|
|
485
481
|
}
|
|
486
482
|
let { state } = this;
|
|
487
483
|
let { scrollerClientWidths, scrollerClientHeights } = state;
|
|
488
484
|
let [sectionCnt, chunksPerSection] = this.getDims();
|
|
489
485
|
let index = sectionIndex * chunksPerSection + chunkIndex;
|
|
490
|
-
let sideScrollIndex = (!this.context.isRtl ||
|
|
486
|
+
let sideScrollIndex = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0;
|
|
491
487
|
let isVScrollSide = chunkIndex === sideScrollIndex;
|
|
492
488
|
let isLastSection = sectionIndex === sectionCnt - 1;
|
|
493
489
|
let forceXScrollbars = isLastSection && state.forceXScrollbars; // NOOOO can result in `null`
|
|
494
490
|
let forceYScrollbars = isVScrollSide && state.forceYScrollbars; // NOOOO can result in `null`
|
|
495
491
|
let allowXScrolling = colGroupStat && colGroupStat.allowXScrolling; // rename?
|
|
496
|
-
let allowYScrolling =
|
|
497
|
-
let chunkVGrow =
|
|
492
|
+
let allowYScrolling = getAllowYScrolling(this.props, sectionConfig); // rename? do in section func?
|
|
493
|
+
let chunkVGrow = getSectionHasLiquidHeight(this.props, sectionConfig); // do in section func?
|
|
498
494
|
let expandRows = sectionConfig.expandRows && chunkVGrow;
|
|
499
495
|
let tableMinWidth = (colGroupStat && colGroupStat.totalColMinWidth) || '';
|
|
500
|
-
let content =
|
|
496
|
+
let content = renderChunkContent(sectionConfig, chunkConfig, {
|
|
501
497
|
tableColGroupNode: microColGroupNode,
|
|
502
498
|
tableMinWidth,
|
|
503
499
|
clientWidth: scrollerClientWidths[index] !== undefined ? scrollerClientWidths[index] : null,
|
|
@@ -515,17 +511,17 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
515
511
|
(isVScrollSide ? 'auto' : 'scroll-hidden');
|
|
516
512
|
// it *could* be possible to reduce DOM wrappers by only doing a ClippedScroller when allowXScrolling or allowYScrolling,
|
|
517
513
|
// but if these values were to change, the inner components would be unmounted/remounted because of the parent change.
|
|
518
|
-
content = (
|
|
519
|
-
return
|
|
514
|
+
content = (createElement(ClippedScroller, { ref: this.clippedScrollerRefs.createRef(index), scrollerElRef: this.scrollerElRefs.createRef(index), overflowX: overflowX, overflowY: overflowY, liquid: chunkVGrow, maxHeight: sectionConfig.maxHeight }, content));
|
|
515
|
+
return createElement(isHeader ? 'th' : 'td', {
|
|
520
516
|
key: chunkConfig.key,
|
|
521
517
|
ref: this.chunkElRefs.createRef(index),
|
|
522
518
|
role: 'presentation',
|
|
523
519
|
}, content);
|
|
524
520
|
}
|
|
525
521
|
componentDidMount() {
|
|
526
|
-
this.getStickyScrolling =
|
|
527
|
-
this.getScrollSyncersBySection =
|
|
528
|
-
this.getScrollSyncersByColumn =
|
|
522
|
+
this.getStickyScrolling = memoizeArraylike(initStickyScrolling);
|
|
523
|
+
this.getScrollSyncersBySection = memoizeHashlike(initScrollSyncer.bind(this, true), null, destroyScrollSyncer);
|
|
524
|
+
this.getScrollSyncersByColumn = memoizeHashlike(initScrollSyncer.bind(this, false), null, destroyScrollSyncer);
|
|
529
525
|
this.updateScrollSyncers();
|
|
530
526
|
this.handleSizing(false);
|
|
531
527
|
this.context.addResizeHandler(this.handleSizing);
|
|
@@ -542,7 +538,7 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
542
538
|
allowSizing() {
|
|
543
539
|
let now = new Date();
|
|
544
540
|
if (!this.lastSizingDate ||
|
|
545
|
-
now.valueOf() > this.lastSizingDate.valueOf() +
|
|
541
|
+
now.valueOf() > this.lastSizingDate.valueOf() + config.SCROLLGRID_RESIZE_INTERVAL) {
|
|
546
542
|
this.lastSizingDate = now;
|
|
547
543
|
this.recentSizingCnt = 0;
|
|
548
544
|
return true;
|
|
@@ -557,7 +553,7 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
557
553
|
colGroupStats.forEach((colGroupStat, i) => {
|
|
558
554
|
if (colGroupStat.hasShrinkCol) {
|
|
559
555
|
let chunkEls = this.chunkElRefs.collect(i, cnt, chunksPerSection); // in one col
|
|
560
|
-
shrinkWidths[i] =
|
|
556
|
+
shrinkWidths[i] = computeShrinkWidth(chunkEls);
|
|
561
557
|
}
|
|
562
558
|
});
|
|
563
559
|
return shrinkWidths;
|
|
@@ -578,7 +574,7 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
578
574
|
let rowHeights = [];
|
|
579
575
|
let chunkEl = this.chunkElRefs.currentMap[index];
|
|
580
576
|
if (chunkEl) {
|
|
581
|
-
rowHeights =
|
|
577
|
+
rowHeights = findElements(chunkEl, '.fc-scrollgrid-sync-table tr').map((rowEl) => {
|
|
582
578
|
let max = getRowInnerMaxHeight(rowEl);
|
|
583
579
|
newHeightMap.set(rowEl, max);
|
|
584
580
|
return max;
|
|
@@ -649,9 +645,9 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
649
645
|
return sectionRowMaxHeights;
|
|
650
646
|
}
|
|
651
647
|
computeScrollerDims() {
|
|
652
|
-
let scrollbarWidth =
|
|
648
|
+
let scrollbarWidth = getScrollbarWidths();
|
|
653
649
|
let [sectionCnt, chunksPerSection] = this.getDims();
|
|
654
|
-
let sideScrollI = (!this.context.isRtl ||
|
|
650
|
+
let sideScrollI = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0;
|
|
655
651
|
let lastSectionI = sectionCnt - 1;
|
|
656
652
|
let currentScrollers = this.clippedScrollerRefs.currentMap;
|
|
657
653
|
let scrollerEls = this.scrollerElRefs.currentMap;
|
|
@@ -708,7 +704,7 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
708
704
|
for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {
|
|
709
705
|
let startIndex = sectionI * chunksPerSection;
|
|
710
706
|
let endIndex = startIndex + chunksPerSection;
|
|
711
|
-
scrollElsBySection[sectionI] =
|
|
707
|
+
scrollElsBySection[sectionI] = collectFromHash(scrollElMap, startIndex, endIndex, 1); // use the filtered
|
|
712
708
|
}
|
|
713
709
|
for (let col = 0; col < chunksPerSection; col += 1) {
|
|
714
710
|
scrollElsByColumn[col] = this.scrollerElRefs.collect(col, cnt, chunksPerSection); // DON'T use the filtered
|
|
@@ -717,8 +713,8 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
717
713
|
this.scrollSyncersByColumn = this.getScrollSyncersByColumn(scrollElsByColumn);
|
|
718
714
|
}
|
|
719
715
|
destroyScrollSyncers() {
|
|
720
|
-
|
|
721
|
-
|
|
716
|
+
mapHash(this.scrollSyncersBySection, destroyScrollSyncer);
|
|
717
|
+
mapHash(this.scrollSyncersByColumn, destroyScrollSyncer);
|
|
722
718
|
}
|
|
723
719
|
getChunkConfigByIndex(index) {
|
|
724
720
|
let chunksPerSection = this.getDims()[1];
|
|
@@ -742,13 +738,13 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
742
738
|
_handleChunkEl(chunkEl, key) {
|
|
743
739
|
let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10));
|
|
744
740
|
if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef
|
|
745
|
-
|
|
741
|
+
setRef(chunkConfig.elRef, chunkEl);
|
|
746
742
|
}
|
|
747
743
|
}
|
|
748
744
|
_handleScrollerEl(scrollerEl, key) {
|
|
749
745
|
let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10));
|
|
750
746
|
if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef
|
|
751
|
-
|
|
747
|
+
setRef(chunkConfig.scrollerElRef, scrollerEl);
|
|
752
748
|
}
|
|
753
749
|
}
|
|
754
750
|
getDims() {
|
|
@@ -758,9 +754,9 @@ class ScrollGrid extends internal_cjs.BaseComponent {
|
|
|
758
754
|
}
|
|
759
755
|
}
|
|
760
756
|
ScrollGrid.addStateEquality({
|
|
761
|
-
shrinkWidths:
|
|
762
|
-
scrollerClientWidths:
|
|
763
|
-
scrollerClientHeights:
|
|
757
|
+
shrinkWidths: isArraysEqual,
|
|
758
|
+
scrollerClientWidths: isPropsEqual,
|
|
759
|
+
scrollerClientHeights: isPropsEqual,
|
|
764
760
|
});
|
|
765
761
|
function sumNumbers(numbers) {
|
|
766
762
|
let sum = 0;
|
|
@@ -770,7 +766,7 @@ function sumNumbers(numbers) {
|
|
|
770
766
|
return sum;
|
|
771
767
|
}
|
|
772
768
|
function getRowInnerMaxHeight(rowEl) {
|
|
773
|
-
let innerHeights =
|
|
769
|
+
let innerHeights = findElements(rowEl, '.fc-scrollgrid-sync-inner').map(getElHeight);
|
|
774
770
|
if (innerHeights.length) {
|
|
775
771
|
return Math.max(...innerHeights);
|
|
776
772
|
}
|
|
@@ -783,17 +779,17 @@ function renderMacroColGroup(colGroupStats, shrinkWidths) {
|
|
|
783
779
|
let children = colGroupStats.map((colGroupStat, i) => {
|
|
784
780
|
let width = colGroupStat.width;
|
|
785
781
|
if (width === 'shrink') {
|
|
786
|
-
width = colGroupStat.totalColWidth +
|
|
782
|
+
width = colGroupStat.totalColWidth + sanitizeShrinkWidth(shrinkWidths[i]) + 1; // +1 for border :(
|
|
787
783
|
}
|
|
788
784
|
return ( // eslint-disable-next-line react/jsx-key
|
|
789
|
-
|
|
785
|
+
createElement("col", { style: { width } }));
|
|
790
786
|
});
|
|
791
|
-
return
|
|
787
|
+
return createElement('colgroup', {}, ...children);
|
|
792
788
|
}
|
|
793
789
|
function compileColGroupStat(colGroupConfig) {
|
|
794
790
|
let totalColWidth = sumColProp(colGroupConfig.cols, 'width'); // excludes "shrink"
|
|
795
791
|
let totalColMinWidth = sumColProp(colGroupConfig.cols, 'minWidth');
|
|
796
|
-
let hasShrinkCol =
|
|
792
|
+
let hasShrinkCol = hasShrinkWidth(colGroupConfig.cols);
|
|
797
793
|
let allowXScrolling = colGroupConfig.width !== 'shrink' && Boolean(totalColWidth || totalColMinWidth || hasShrinkCol);
|
|
798
794
|
return {
|
|
799
795
|
hasShrinkCol,
|
|
@@ -815,10 +811,10 @@ function sumColProp(cols, propName) {
|
|
|
815
811
|
return total;
|
|
816
812
|
}
|
|
817
813
|
const COL_GROUP_STAT_EQUALITY = {
|
|
818
|
-
cols:
|
|
814
|
+
cols: isColPropsEqual,
|
|
819
815
|
};
|
|
820
816
|
function isColGroupStatsEqual(stat0, stat1) {
|
|
821
|
-
return
|
|
817
|
+
return compareObjs(stat0, stat1, COL_GROUP_STAT_EQUALITY);
|
|
822
818
|
}
|
|
823
819
|
// for memoizers...
|
|
824
820
|
function initScrollSyncer(isVertical, ...scrollEls) {
|
|
@@ -831,4 +827,4 @@ function initStickyScrolling(scrollEl, isRtl) {
|
|
|
831
827
|
return new StickyScrolling(scrollEl, isRtl);
|
|
832
828
|
}
|
|
833
829
|
|
|
834
|
-
|
|
830
|
+
export { ScrollGrid };
|
package/internal.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var internal = require('@fullcalendar/core/internal');
|
|
6
|
+
var preact = require('@fullcalendar/core/preact');
|
|
3
7
|
|
|
4
8
|
// TODO: assume the el has no borders?
|
|
5
9
|
function getScrollCanvasOrigin(scrollEl) {
|
|
6
10
|
let rect = scrollEl.getBoundingClientRect();
|
|
7
|
-
let edges = computeEdges(scrollEl); // TODO: pass in isRtl?
|
|
11
|
+
let edges = internal.computeEdges(scrollEl); // TODO: pass in isRtl?
|
|
8
12
|
return {
|
|
9
13
|
left: rect.left + edges.borderLeft + edges.scrollbarLeft - getScrollFromLeftEdge(scrollEl),
|
|
10
14
|
top: rect.top + edges.borderTop - scrollEl.scrollTop,
|
|
@@ -67,7 +71,7 @@ function detectRtlScrollSystem() {
|
|
|
67
71
|
system = 'negative'; // scroll is a negative number from the right edge
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
|
-
removeElement(el);
|
|
74
|
+
internal.removeElement(el);
|
|
71
75
|
return system;
|
|
72
76
|
}
|
|
73
77
|
|
|
@@ -86,7 +90,7 @@ class StickyScrolling {
|
|
|
86
90
|
this.isRtl = isRtl;
|
|
87
91
|
this.updateSize = () => {
|
|
88
92
|
let { scrollEl } = this;
|
|
89
|
-
let els = findElements(scrollEl, STICKY_SELECTOR);
|
|
93
|
+
let els = internal.findElements(scrollEl, STICKY_SELECTOR);
|
|
90
94
|
let elGeoms = this.queryElGeoms(els);
|
|
91
95
|
let viewportWidth = scrollEl.clientWidth;
|
|
92
96
|
assignStickyPositions(els, elGeoms, viewportWidth);
|
|
@@ -97,7 +101,7 @@ class StickyScrolling {
|
|
|
97
101
|
let canvasOrigin = getScrollCanvasOrigin(scrollEl);
|
|
98
102
|
let elGeoms = [];
|
|
99
103
|
for (let el of els) {
|
|
100
|
-
let parentBound = translateRect(computeInnerRect(el.parentNode, true, true), // weird way to call this!!!
|
|
104
|
+
let parentBound = internal.translateRect(internal.computeInnerRect(el.parentNode, true, true), // weird way to call this!!!
|
|
101
105
|
-canvasOrigin.left, -canvasOrigin.top);
|
|
102
106
|
let elRect = el.getBoundingClientRect();
|
|
103
107
|
let computedStyles = window.getComputedStyle(el);
|
|
@@ -110,7 +114,7 @@ class StickyScrolling {
|
|
|
110
114
|
textAlign = isRtl ? 'left' : 'right';
|
|
111
115
|
}
|
|
112
116
|
if (computedStyles.position !== 'sticky') {
|
|
113
|
-
naturalBound = translateRect(elRect, -canvasOrigin.left - (parseFloat(computedStyles.left) || 0), // could be 'auto'
|
|
117
|
+
naturalBound = internal.translateRect(elRect, -canvasOrigin.left - (parseFloat(computedStyles.left) || 0), // could be 'auto'
|
|
114
118
|
-canvasOrigin.top - (parseFloat(computedStyles.top) || 0));
|
|
115
119
|
}
|
|
116
120
|
elGeoms.push({
|
|
@@ -136,7 +140,7 @@ function assignStickyPositions(els, elGeoms, viewportWidth) {
|
|
|
136
140
|
else { // if parent container can be completely in view, we don't need stickiness
|
|
137
141
|
left = '';
|
|
138
142
|
}
|
|
139
|
-
applyStyle(el, {
|
|
143
|
+
internal.applyStyle(el, {
|
|
140
144
|
left,
|
|
141
145
|
right: left,
|
|
142
146
|
top: 0,
|
|
@@ -144,17 +148,17 @@ function assignStickyPositions(els, elGeoms, viewportWidth) {
|
|
|
144
148
|
});
|
|
145
149
|
}
|
|
146
150
|
|
|
147
|
-
class ClippedScroller extends BaseComponent {
|
|
151
|
+
class ClippedScroller extends internal.BaseComponent {
|
|
148
152
|
constructor() {
|
|
149
153
|
super(...arguments);
|
|
150
|
-
this.elRef = createRef();
|
|
154
|
+
this.elRef = preact.createRef();
|
|
151
155
|
this.state = {
|
|
152
156
|
xScrollbarWidth: 0,
|
|
153
157
|
yScrollbarWidth: 0,
|
|
154
158
|
};
|
|
155
159
|
this.handleScroller = (scroller) => {
|
|
156
160
|
this.scroller = scroller;
|
|
157
|
-
setRef(this.props.scrollerRef, scroller);
|
|
161
|
+
internal.setRef(this.props.scrollerRef, scroller);
|
|
158
162
|
};
|
|
159
163
|
this.handleSizing = () => {
|
|
160
164
|
let { props } = this;
|
|
@@ -168,7 +172,7 @@ class ClippedScroller extends BaseComponent {
|
|
|
168
172
|
}
|
|
169
173
|
render() {
|
|
170
174
|
let { props, state, context } = this;
|
|
171
|
-
let isScrollbarOnLeft = context.isRtl && getIsRtlScrollbarOnLeft();
|
|
175
|
+
let isScrollbarOnLeft = context.isRtl && internal.getIsRtlScrollbarOnLeft();
|
|
172
176
|
let overcomeLeft = 0;
|
|
173
177
|
let overcomeRight = 0;
|
|
174
178
|
let overcomeBottom = 0;
|
|
@@ -185,8 +189,8 @@ class ClippedScroller extends BaseComponent {
|
|
|
185
189
|
}
|
|
186
190
|
}
|
|
187
191
|
}
|
|
188
|
-
return (createElement("div", { ref: this.elRef, className: 'fc-scroller-harness' + (props.liquid ? ' fc-scroller-harness-liquid' : '') },
|
|
189
|
-
createElement(Scroller, { ref: this.handleScroller, elRef: this.props.scrollerElRef, overflowX: props.overflowX === 'scroll-hidden' ? 'scroll' : props.overflowX, overflowY: props.overflowY === 'scroll-hidden' ? 'scroll' : props.overflowY, overcomeLeft: overcomeLeft, overcomeRight: overcomeRight, overcomeBottom: overcomeBottom, maxHeight: typeof props.maxHeight === 'number'
|
|
192
|
+
return (preact.createElement("div", { ref: this.elRef, className: 'fc-scroller-harness' + (props.liquid ? ' fc-scroller-harness-liquid' : '') },
|
|
193
|
+
preact.createElement(internal.Scroller, { ref: this.handleScroller, elRef: this.props.scrollerElRef, overflowX: props.overflowX === 'scroll-hidden' ? 'scroll' : props.overflowX, overflowY: props.overflowY === 'scroll-hidden' ? 'scroll' : props.overflowY, overcomeLeft: overcomeLeft, overcomeRight: overcomeRight, overcomeBottom: overcomeBottom, maxHeight: typeof props.maxHeight === 'number'
|
|
190
194
|
? (props.maxHeight + (props.overflowX === 'scroll-hidden' ? state.xScrollbarWidth : 0))
|
|
191
195
|
: '', liquid: props.liquid, liquidIsAbsolute: true }, props.children)));
|
|
192
196
|
}
|
|
@@ -195,7 +199,7 @@ class ClippedScroller extends BaseComponent {
|
|
|
195
199
|
this.context.addResizeHandler(this.handleSizing);
|
|
196
200
|
}
|
|
197
201
|
componentDidUpdate(prevProps) {
|
|
198
|
-
if (!isPropsEqual(prevProps, this.props)) { // an external change?
|
|
202
|
+
if (!internal.isPropsEqual(prevProps, this.props)) { // an external change?
|
|
199
203
|
this.handleSizing();
|
|
200
204
|
}
|
|
201
205
|
}
|
|
@@ -217,13 +221,13 @@ ALSO, with the ability to disable touch
|
|
|
217
221
|
class ScrollListener {
|
|
218
222
|
constructor(el) {
|
|
219
223
|
this.el = el;
|
|
220
|
-
this.emitter = new Emitter();
|
|
224
|
+
this.emitter = new internal.Emitter();
|
|
221
225
|
this.isScrolling = false;
|
|
222
226
|
this.isTouching = false; // user currently has finger down?
|
|
223
227
|
this.isRecentlyWheeled = false;
|
|
224
228
|
this.isRecentlyScrolled = false;
|
|
225
|
-
this.wheelWaiter = new DelayedRunner(this._handleWheelWaited.bind(this));
|
|
226
|
-
this.scrollWaiter = new DelayedRunner(this._handleScrollWaited.bind(this));
|
|
229
|
+
this.wheelWaiter = new internal.DelayedRunner(this._handleWheelWaited.bind(this));
|
|
230
|
+
this.scrollWaiter = new internal.DelayedRunner(this._handleScrollWaited.bind(this));
|
|
227
231
|
// Handlers
|
|
228
232
|
// ----------------------------------------------------------------------------------------------
|
|
229
233
|
this.handleScroll = () => {
|
|
@@ -366,20 +370,20 @@ class ScrollSyncer {
|
|
|
366
370
|
}
|
|
367
371
|
}
|
|
368
372
|
|
|
369
|
-
config.SCROLLGRID_RESIZE_INTERVAL = 500;
|
|
373
|
+
internal.config.SCROLLGRID_RESIZE_INTERVAL = 500;
|
|
370
374
|
/*
|
|
371
375
|
TODO: make <ScrollGridSection> subcomponent
|
|
372
376
|
NOTE: doesn't support collapsibleWidth (which is sortof a hack anyway)
|
|
373
377
|
*/
|
|
374
|
-
class ScrollGrid extends BaseComponent {
|
|
378
|
+
class ScrollGrid extends internal.BaseComponent {
|
|
375
379
|
constructor() {
|
|
376
380
|
super(...arguments);
|
|
377
|
-
this.compileColGroupStats = memoizeArraylike(compileColGroupStat, isColGroupStatsEqual);
|
|
378
|
-
this.renderMicroColGroups = memoizeArraylike(renderMicroColGroup); // yucky to memoize VNodes, but much more efficient for consumers
|
|
379
|
-
this.clippedScrollerRefs = new RefMap();
|
|
381
|
+
this.compileColGroupStats = internal.memoizeArraylike(compileColGroupStat, isColGroupStatsEqual);
|
|
382
|
+
this.renderMicroColGroups = internal.memoizeArraylike(internal.renderMicroColGroup); // yucky to memoize VNodes, but much more efficient for consumers
|
|
383
|
+
this.clippedScrollerRefs = new internal.RefMap();
|
|
380
384
|
// doesn't hold non-scrolling els used just for padding
|
|
381
|
-
this.scrollerElRefs = new RefMap(this._handleScrollerEl.bind(this));
|
|
382
|
-
this.chunkElRefs = new RefMap(this._handleChunkEl.bind(this));
|
|
385
|
+
this.scrollerElRefs = new internal.RefMap(this._handleScrollerEl.bind(this));
|
|
386
|
+
this.chunkElRefs = new internal.RefMap(this._handleChunkEl.bind(this));
|
|
383
387
|
this.scrollSyncersBySection = {};
|
|
384
388
|
this.scrollSyncersByColumn = {};
|
|
385
389
|
// for row-height-syncing
|
|
@@ -439,7 +443,7 @@ class ScrollGrid extends BaseComponent {
|
|
|
439
443
|
let { shrinkWidths } = state;
|
|
440
444
|
let colGroupStats = this.compileColGroupStats(props.colGroups.map((colGroup) => [colGroup]));
|
|
441
445
|
let microColGroupNodes = this.renderMicroColGroups(colGroupStats.map((stat, i) => [stat.cols, shrinkWidths[i]]));
|
|
442
|
-
let classNames = getScrollGridClassNames(props.liquid, context);
|
|
446
|
+
let classNames = internal.getScrollGridClassNames(props.liquid, context);
|
|
443
447
|
this.getDims();
|
|
444
448
|
// TODO: make DRY
|
|
445
449
|
let sectionConfigs = props.sections;
|
|
@@ -461,39 +465,39 @@ class ScrollGrid extends BaseComponent {
|
|
|
461
465
|
footSectionNodes.push(this.renderSection(currentConfig, configI, colGroupStats, microColGroupNodes, state.sectionRowMaxHeights, true));
|
|
462
466
|
configI += 1;
|
|
463
467
|
}
|
|
464
|
-
const isBuggy = !getCanVGrowWithinCell(); // see NOTE in SimpleScrollGrid
|
|
468
|
+
const isBuggy = !internal.getCanVGrowWithinCell(); // see NOTE in SimpleScrollGrid
|
|
465
469
|
const roleAttrs = { role: 'rowgroup' };
|
|
466
|
-
return createElement('table', {
|
|
470
|
+
return preact.createElement('table', {
|
|
467
471
|
ref: props.elRef,
|
|
468
472
|
role: 'grid',
|
|
469
473
|
className: classNames.join(' '),
|
|
470
|
-
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && createElement('thead', roleAttrs, ...headSectionNodes), Boolean(!isBuggy && bodySectionNodes.length) && createElement('tbody', roleAttrs, ...bodySectionNodes), Boolean(!isBuggy && footSectionNodes.length) && createElement('tfoot', roleAttrs, ...footSectionNodes), isBuggy && createElement('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes));
|
|
474
|
+
}, renderMacroColGroup(colGroupStats, shrinkWidths), Boolean(!isBuggy && headSectionNodes.length) && preact.createElement('thead', roleAttrs, ...headSectionNodes), Boolean(!isBuggy && bodySectionNodes.length) && preact.createElement('tbody', roleAttrs, ...bodySectionNodes), Boolean(!isBuggy && footSectionNodes.length) && preact.createElement('tfoot', roleAttrs, ...footSectionNodes), isBuggy && preact.createElement('tbody', roleAttrs, ...headSectionNodes, ...bodySectionNodes, ...footSectionNodes));
|
|
471
475
|
}
|
|
472
476
|
renderSection(sectionConfig, sectionIndex, colGroupStats, microColGroupNodes, sectionRowMaxHeights, isHeader) {
|
|
473
477
|
if ('outerContent' in sectionConfig) {
|
|
474
|
-
return (createElement(Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));
|
|
478
|
+
return (preact.createElement(preact.Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));
|
|
475
479
|
}
|
|
476
|
-
return (createElement("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map((chunkConfig, i) => this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || [], isHeader))));
|
|
480
|
+
return (preact.createElement("tr", { key: sectionConfig.key, role: "presentation", className: internal.getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, sectionConfig.chunks.map((chunkConfig, i) => this.renderChunk(sectionConfig, sectionIndex, colGroupStats[i], microColGroupNodes[i], chunkConfig, i, (sectionRowMaxHeights[sectionIndex] || [])[i] || [], isHeader))));
|
|
477
481
|
}
|
|
478
482
|
renderChunk(sectionConfig, sectionIndex, colGroupStat, microColGroupNode, chunkConfig, chunkIndex, rowHeights, isHeader) {
|
|
479
483
|
if ('outerContent' in chunkConfig) {
|
|
480
|
-
return (createElement(Fragment, { key: chunkConfig.key }, chunkConfig.outerContent));
|
|
484
|
+
return (preact.createElement(preact.Fragment, { key: chunkConfig.key }, chunkConfig.outerContent));
|
|
481
485
|
}
|
|
482
486
|
let { state } = this;
|
|
483
487
|
let { scrollerClientWidths, scrollerClientHeights } = state;
|
|
484
488
|
let [sectionCnt, chunksPerSection] = this.getDims();
|
|
485
489
|
let index = sectionIndex * chunksPerSection + chunkIndex;
|
|
486
|
-
let sideScrollIndex = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0;
|
|
490
|
+
let sideScrollIndex = (!this.context.isRtl || internal.getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0;
|
|
487
491
|
let isVScrollSide = chunkIndex === sideScrollIndex;
|
|
488
492
|
let isLastSection = sectionIndex === sectionCnt - 1;
|
|
489
493
|
let forceXScrollbars = isLastSection && state.forceXScrollbars; // NOOOO can result in `null`
|
|
490
494
|
let forceYScrollbars = isVScrollSide && state.forceYScrollbars; // NOOOO can result in `null`
|
|
491
495
|
let allowXScrolling = colGroupStat && colGroupStat.allowXScrolling; // rename?
|
|
492
|
-
let allowYScrolling = getAllowYScrolling(this.props, sectionConfig); // rename? do in section func?
|
|
493
|
-
let chunkVGrow = getSectionHasLiquidHeight(this.props, sectionConfig); // do in section func?
|
|
496
|
+
let allowYScrolling = internal.getAllowYScrolling(this.props, sectionConfig); // rename? do in section func?
|
|
497
|
+
let chunkVGrow = internal.getSectionHasLiquidHeight(this.props, sectionConfig); // do in section func?
|
|
494
498
|
let expandRows = sectionConfig.expandRows && chunkVGrow;
|
|
495
499
|
let tableMinWidth = (colGroupStat && colGroupStat.totalColMinWidth) || '';
|
|
496
|
-
let content = renderChunkContent(sectionConfig, chunkConfig, {
|
|
500
|
+
let content = internal.renderChunkContent(sectionConfig, chunkConfig, {
|
|
497
501
|
tableColGroupNode: microColGroupNode,
|
|
498
502
|
tableMinWidth,
|
|
499
503
|
clientWidth: scrollerClientWidths[index] !== undefined ? scrollerClientWidths[index] : null,
|
|
@@ -511,17 +515,17 @@ class ScrollGrid extends BaseComponent {
|
|
|
511
515
|
(isVScrollSide ? 'auto' : 'scroll-hidden');
|
|
512
516
|
// it *could* be possible to reduce DOM wrappers by only doing a ClippedScroller when allowXScrolling or allowYScrolling,
|
|
513
517
|
// but if these values were to change, the inner components would be unmounted/remounted because of the parent change.
|
|
514
|
-
content = (createElement(ClippedScroller, { ref: this.clippedScrollerRefs.createRef(index), scrollerElRef: this.scrollerElRefs.createRef(index), overflowX: overflowX, overflowY: overflowY, liquid: chunkVGrow, maxHeight: sectionConfig.maxHeight }, content));
|
|
515
|
-
return createElement(isHeader ? 'th' : 'td', {
|
|
518
|
+
content = (preact.createElement(ClippedScroller, { ref: this.clippedScrollerRefs.createRef(index), scrollerElRef: this.scrollerElRefs.createRef(index), overflowX: overflowX, overflowY: overflowY, liquid: chunkVGrow, maxHeight: sectionConfig.maxHeight }, content));
|
|
519
|
+
return preact.createElement(isHeader ? 'th' : 'td', {
|
|
516
520
|
key: chunkConfig.key,
|
|
517
521
|
ref: this.chunkElRefs.createRef(index),
|
|
518
522
|
role: 'presentation',
|
|
519
523
|
}, content);
|
|
520
524
|
}
|
|
521
525
|
componentDidMount() {
|
|
522
|
-
this.getStickyScrolling = memoizeArraylike(initStickyScrolling);
|
|
523
|
-
this.getScrollSyncersBySection = memoizeHashlike(initScrollSyncer.bind(this, true), null, destroyScrollSyncer);
|
|
524
|
-
this.getScrollSyncersByColumn = memoizeHashlike(initScrollSyncer.bind(this, false), null, destroyScrollSyncer);
|
|
526
|
+
this.getStickyScrolling = internal.memoizeArraylike(initStickyScrolling);
|
|
527
|
+
this.getScrollSyncersBySection = internal.memoizeHashlike(initScrollSyncer.bind(this, true), null, destroyScrollSyncer);
|
|
528
|
+
this.getScrollSyncersByColumn = internal.memoizeHashlike(initScrollSyncer.bind(this, false), null, destroyScrollSyncer);
|
|
525
529
|
this.updateScrollSyncers();
|
|
526
530
|
this.handleSizing(false);
|
|
527
531
|
this.context.addResizeHandler(this.handleSizing);
|
|
@@ -538,7 +542,7 @@ class ScrollGrid extends BaseComponent {
|
|
|
538
542
|
allowSizing() {
|
|
539
543
|
let now = new Date();
|
|
540
544
|
if (!this.lastSizingDate ||
|
|
541
|
-
now.valueOf() > this.lastSizingDate.valueOf() + config.SCROLLGRID_RESIZE_INTERVAL) {
|
|
545
|
+
now.valueOf() > this.lastSizingDate.valueOf() + internal.config.SCROLLGRID_RESIZE_INTERVAL) {
|
|
542
546
|
this.lastSizingDate = now;
|
|
543
547
|
this.recentSizingCnt = 0;
|
|
544
548
|
return true;
|
|
@@ -553,7 +557,7 @@ class ScrollGrid extends BaseComponent {
|
|
|
553
557
|
colGroupStats.forEach((colGroupStat, i) => {
|
|
554
558
|
if (colGroupStat.hasShrinkCol) {
|
|
555
559
|
let chunkEls = this.chunkElRefs.collect(i, cnt, chunksPerSection); // in one col
|
|
556
|
-
shrinkWidths[i] = computeShrinkWidth(chunkEls);
|
|
560
|
+
shrinkWidths[i] = internal.computeShrinkWidth(chunkEls);
|
|
557
561
|
}
|
|
558
562
|
});
|
|
559
563
|
return shrinkWidths;
|
|
@@ -574,7 +578,7 @@ class ScrollGrid extends BaseComponent {
|
|
|
574
578
|
let rowHeights = [];
|
|
575
579
|
let chunkEl = this.chunkElRefs.currentMap[index];
|
|
576
580
|
if (chunkEl) {
|
|
577
|
-
rowHeights = findElements(chunkEl, '.fc-scrollgrid-sync-table tr').map((rowEl) => {
|
|
581
|
+
rowHeights = internal.findElements(chunkEl, '.fc-scrollgrid-sync-table tr').map((rowEl) => {
|
|
578
582
|
let max = getRowInnerMaxHeight(rowEl);
|
|
579
583
|
newHeightMap.set(rowEl, max);
|
|
580
584
|
return max;
|
|
@@ -645,9 +649,9 @@ class ScrollGrid extends BaseComponent {
|
|
|
645
649
|
return sectionRowMaxHeights;
|
|
646
650
|
}
|
|
647
651
|
computeScrollerDims() {
|
|
648
|
-
let scrollbarWidth = getScrollbarWidths();
|
|
652
|
+
let scrollbarWidth = internal.getScrollbarWidths();
|
|
649
653
|
let [sectionCnt, chunksPerSection] = this.getDims();
|
|
650
|
-
let sideScrollI = (!this.context.isRtl || getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0;
|
|
654
|
+
let sideScrollI = (!this.context.isRtl || internal.getIsRtlScrollbarOnLeft()) ? chunksPerSection - 1 : 0;
|
|
651
655
|
let lastSectionI = sectionCnt - 1;
|
|
652
656
|
let currentScrollers = this.clippedScrollerRefs.currentMap;
|
|
653
657
|
let scrollerEls = this.scrollerElRefs.currentMap;
|
|
@@ -704,7 +708,7 @@ class ScrollGrid extends BaseComponent {
|
|
|
704
708
|
for (let sectionI = 0; sectionI < sectionCnt; sectionI += 1) {
|
|
705
709
|
let startIndex = sectionI * chunksPerSection;
|
|
706
710
|
let endIndex = startIndex + chunksPerSection;
|
|
707
|
-
scrollElsBySection[sectionI] = collectFromHash(scrollElMap, startIndex, endIndex, 1); // use the filtered
|
|
711
|
+
scrollElsBySection[sectionI] = internal.collectFromHash(scrollElMap, startIndex, endIndex, 1); // use the filtered
|
|
708
712
|
}
|
|
709
713
|
for (let col = 0; col < chunksPerSection; col += 1) {
|
|
710
714
|
scrollElsByColumn[col] = this.scrollerElRefs.collect(col, cnt, chunksPerSection); // DON'T use the filtered
|
|
@@ -713,8 +717,8 @@ class ScrollGrid extends BaseComponent {
|
|
|
713
717
|
this.scrollSyncersByColumn = this.getScrollSyncersByColumn(scrollElsByColumn);
|
|
714
718
|
}
|
|
715
719
|
destroyScrollSyncers() {
|
|
716
|
-
mapHash(this.scrollSyncersBySection, destroyScrollSyncer);
|
|
717
|
-
mapHash(this.scrollSyncersByColumn, destroyScrollSyncer);
|
|
720
|
+
internal.mapHash(this.scrollSyncersBySection, destroyScrollSyncer);
|
|
721
|
+
internal.mapHash(this.scrollSyncersByColumn, destroyScrollSyncer);
|
|
718
722
|
}
|
|
719
723
|
getChunkConfigByIndex(index) {
|
|
720
724
|
let chunksPerSection = this.getDims()[1];
|
|
@@ -738,13 +742,13 @@ class ScrollGrid extends BaseComponent {
|
|
|
738
742
|
_handleChunkEl(chunkEl, key) {
|
|
739
743
|
let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10));
|
|
740
744
|
if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef
|
|
741
|
-
setRef(chunkConfig.elRef, chunkEl);
|
|
745
|
+
internal.setRef(chunkConfig.elRef, chunkEl);
|
|
742
746
|
}
|
|
743
747
|
}
|
|
744
748
|
_handleScrollerEl(scrollerEl, key) {
|
|
745
749
|
let chunkConfig = this.getChunkConfigByIndex(parseInt(key, 10));
|
|
746
750
|
if (chunkConfig) { // null if section disappeared. bad, b/c won't null-set the elRef
|
|
747
|
-
setRef(chunkConfig.scrollerElRef, scrollerEl);
|
|
751
|
+
internal.setRef(chunkConfig.scrollerElRef, scrollerEl);
|
|
748
752
|
}
|
|
749
753
|
}
|
|
750
754
|
getDims() {
|
|
@@ -754,9 +758,9 @@ class ScrollGrid extends BaseComponent {
|
|
|
754
758
|
}
|
|
755
759
|
}
|
|
756
760
|
ScrollGrid.addStateEquality({
|
|
757
|
-
shrinkWidths: isArraysEqual,
|
|
758
|
-
scrollerClientWidths: isPropsEqual,
|
|
759
|
-
scrollerClientHeights: isPropsEqual,
|
|
761
|
+
shrinkWidths: internal.isArraysEqual,
|
|
762
|
+
scrollerClientWidths: internal.isPropsEqual,
|
|
763
|
+
scrollerClientHeights: internal.isPropsEqual,
|
|
760
764
|
});
|
|
761
765
|
function sumNumbers(numbers) {
|
|
762
766
|
let sum = 0;
|
|
@@ -766,7 +770,7 @@ function sumNumbers(numbers) {
|
|
|
766
770
|
return sum;
|
|
767
771
|
}
|
|
768
772
|
function getRowInnerMaxHeight(rowEl) {
|
|
769
|
-
let innerHeights = findElements(rowEl, '.fc-scrollgrid-sync-inner').map(getElHeight);
|
|
773
|
+
let innerHeights = internal.findElements(rowEl, '.fc-scrollgrid-sync-inner').map(getElHeight);
|
|
770
774
|
if (innerHeights.length) {
|
|
771
775
|
return Math.max(...innerHeights);
|
|
772
776
|
}
|
|
@@ -779,17 +783,17 @@ function renderMacroColGroup(colGroupStats, shrinkWidths) {
|
|
|
779
783
|
let children = colGroupStats.map((colGroupStat, i) => {
|
|
780
784
|
let width = colGroupStat.width;
|
|
781
785
|
if (width === 'shrink') {
|
|
782
|
-
width = colGroupStat.totalColWidth + sanitizeShrinkWidth(shrinkWidths[i]) + 1; // +1 for border :(
|
|
786
|
+
width = colGroupStat.totalColWidth + internal.sanitizeShrinkWidth(shrinkWidths[i]) + 1; // +1 for border :(
|
|
783
787
|
}
|
|
784
788
|
return ( // eslint-disable-next-line react/jsx-key
|
|
785
|
-
createElement("col", { style: { width } }));
|
|
789
|
+
preact.createElement("col", { style: { width } }));
|
|
786
790
|
});
|
|
787
|
-
return createElement('colgroup', {}, ...children);
|
|
791
|
+
return preact.createElement('colgroup', {}, ...children);
|
|
788
792
|
}
|
|
789
793
|
function compileColGroupStat(colGroupConfig) {
|
|
790
794
|
let totalColWidth = sumColProp(colGroupConfig.cols, 'width'); // excludes "shrink"
|
|
791
795
|
let totalColMinWidth = sumColProp(colGroupConfig.cols, 'minWidth');
|
|
792
|
-
let hasShrinkCol = hasShrinkWidth(colGroupConfig.cols);
|
|
796
|
+
let hasShrinkCol = internal.hasShrinkWidth(colGroupConfig.cols);
|
|
793
797
|
let allowXScrolling = colGroupConfig.width !== 'shrink' && Boolean(totalColWidth || totalColMinWidth || hasShrinkCol);
|
|
794
798
|
return {
|
|
795
799
|
hasShrinkCol,
|
|
@@ -811,10 +815,10 @@ function sumColProp(cols, propName) {
|
|
|
811
815
|
return total;
|
|
812
816
|
}
|
|
813
817
|
const COL_GROUP_STAT_EQUALITY = {
|
|
814
|
-
cols: isColPropsEqual,
|
|
818
|
+
cols: internal.isColPropsEqual,
|
|
815
819
|
};
|
|
816
820
|
function isColGroupStatsEqual(stat0, stat1) {
|
|
817
|
-
return compareObjs(stat0, stat1, COL_GROUP_STAT_EQUALITY);
|
|
821
|
+
return internal.compareObjs(stat0, stat1, COL_GROUP_STAT_EQUALITY);
|
|
818
822
|
}
|
|
819
823
|
// for memoizers...
|
|
820
824
|
function initScrollSyncer(isVertical, ...scrollEls) {
|
|
@@ -827,4 +831,4 @@ function initStickyScrolling(scrollEl, isRtl) {
|
|
|
827
831
|
return new StickyScrolling(scrollEl, isRtl);
|
|
828
832
|
}
|
|
829
833
|
|
|
830
|
-
|
|
834
|
+
exports.ScrollGrid = ScrollGrid;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullcalendar/scrollgrid",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"title": "FullCalendar ScrollGrid Plugin",
|
|
5
5
|
"description": "Tabular data chunked into scrollable panes",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@fullcalendar/premium-common": "~6.0
|
|
7
|
+
"@fullcalendar/premium-common": "~6.1.0"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@fullcalendar/core": "~6.0
|
|
10
|
+
"@fullcalendar/core": "~6.1.0"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
13
|
"keywords": [
|
|
@@ -32,26 +32,22 @@
|
|
|
32
32
|
"url": "http://arshaw.com/"
|
|
33
33
|
},
|
|
34
34
|
"copyright": "2022 Adam Shaw",
|
|
35
|
-
"main": "./index.cjs",
|
|
36
|
-
"module": "./index.js",
|
|
37
35
|
"types": "./index.d.ts",
|
|
36
|
+
"main": "./index.js",
|
|
37
|
+
"module": "./index.esm.js",
|
|
38
38
|
"unpkg": "./index.global.min.js",
|
|
39
39
|
"jsdelivr": "./index.global.min.js",
|
|
40
40
|
"exports": {
|
|
41
41
|
"./package.json": "./package.json",
|
|
42
|
-
"./index.cjs": "./index.cjs",
|
|
43
|
-
"./index.js": "./index.js",
|
|
44
42
|
".": {
|
|
45
43
|
"types": "./index.d.ts",
|
|
46
|
-
"require": "./index.
|
|
47
|
-
"import": "./index.js"
|
|
44
|
+
"require": "./index.js",
|
|
45
|
+
"import": "./index.esm.js"
|
|
48
46
|
},
|
|
49
|
-
"./internal.cjs": "./internal.cjs",
|
|
50
|
-
"./internal.js": "./internal.js",
|
|
51
47
|
"./internal": {
|
|
52
48
|
"types": "./internal.d.ts",
|
|
53
|
-
"require": "./internal.
|
|
54
|
-
"import": "./internal.js"
|
|
49
|
+
"require": "./internal.js",
|
|
50
|
+
"import": "./internal.esm.js"
|
|
55
51
|
}
|
|
56
52
|
},
|
|
57
53
|
"sideEffects": false
|
package/index.cjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var index_cjs = require('@fullcalendar/core/index.cjs');
|
|
6
|
-
var premiumCommonPlugin = require('@fullcalendar/premium-common/index.cjs');
|
|
7
|
-
var internalCommon = require('./internal.cjs');
|
|
8
|
-
require('@fullcalendar/core/internal.cjs');
|
|
9
|
-
require('@fullcalendar/core/preact.cjs');
|
|
10
|
-
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var premiumCommonPlugin__default = /*#__PURE__*/_interopDefaultLegacy(premiumCommonPlugin);
|
|
14
|
-
|
|
15
|
-
var index = index_cjs.createPlugin({
|
|
16
|
-
name: '@fullcalendar/scrollgrid',
|
|
17
|
-
premiumReleaseDate: '2022-12-27',
|
|
18
|
-
deps: [premiumCommonPlugin__default["default"]],
|
|
19
|
-
scrollGridImpl: internalCommon.ScrollGrid,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
exports["default"] = index;
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { createPlugin, PluginDef } from '@fullcalendar/core'\nimport premiumCommonPlugin from '@fullcalendar/premium-common'\nimport { ScrollGrid } from './ScrollGrid.js'\nimport './ambient.js'\n\nexport default createPlugin({\n name: '<%= pkgName %>',\n premiumReleaseDate: '<%= releaseDate %>',\n deps: [premiumCommonPlugin],\n scrollGridImpl: ScrollGrid,\n}) as PluginDef\n"],"names":[],"mappings":";;;;;;AAKA,YAAe,YAAY,CAAC;AAC1B,IAAA,IAAI,EAAE,0BAAgB;AACtB,IAAA,kBAAkB,EAAE,YAAoB;IACxC,IAAI,EAAE,CAAC,mBAAmB,CAAC;AAC3B,IAAA,cAAc,EAAE,UAAU;AAC3B,CAAA,CAAc;;;;"}
|
package/internal.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sources":["../src/scroll-left-norm.ts","../src/StickyScrolling.ts","../src/ClippedScroller.tsx","../src/ScrollListener.ts","../src/ScrollSyncer.ts","../src/ScrollGrid.tsx"],"sourcesContent":["import { removeElement, computeEdges } from '@fullcalendar/core/internal'\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\nfunction 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 { CssDimValue } from '@fullcalendar/core'\nimport {\n applyStyle,\n translateRect, Rect,\n findElements,\n computeInnerRect,\n} from '@fullcalendar/core/internal'\nimport { ScrollListener } from './ScrollListener.js'\nimport { getScrollCanvasOrigin } from './scroll-left-norm.js'\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 STICKY_SELECTOR = '.fc-sticky'\n\n/*\nGoes beyond mere position:sticky, allows horizontal centering\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\n constructor(\n private scrollEl: HTMLElement,\n private isRtl: boolean,\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\n assignStickyPositions(els, elGeoms, viewportWidth)\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\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","import {\n BaseComponent,\n setRef,\n ScrollerLike,\n Scroller, OverflowValue,\n getIsRtlScrollbarOnLeft,\n isPropsEqual,\n} from '@fullcalendar/core/internal'\nimport {\n createElement,\n ComponentChildren,\n createRef,\n Ref,\n} from '@fullcalendar/core/preact'\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 { Emitter, DelayedRunner } from '@fullcalendar/core/internal'\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: Emitter<any> = 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 { ScrollListener } from './ScrollListener.js'\nimport { setScrollFromLeftEdge } from './scroll-left-norm.js'\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 { CssDimValue } from '@fullcalendar/core'\nimport {\n BaseComponent,\n isArraysEqual,\n findElements,\n mapHash,\n RefMap,\n ColProps, 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 MemoiseArrayFunc,\n collectFromHash,\n memoizeHashlike,\n MemoizeHashFunc,\n ScrollGridChunkConfig,\n getCanVGrowWithinCell,\n config,\n} from '@fullcalendar/core/internal'\nimport { createElement, VNode, Fragment } from '@fullcalendar/core/preact'\nimport { StickyScrolling } from './StickyScrolling.js'\nimport { ClippedScroller, ClippedOverflowValue } from './ClippedScroller.js'\nimport { ScrollSyncer } from './ScrollSyncer.js'\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\nconfig.SCROLLGRID_RESIZE_INTERVAL = 500\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: MemoiseArrayFunc<[HTMLElement, boolean], StickyScrolling>\n private getScrollSyncersBySection: MemoizeHashFunc<HTMLElement[], ScrollSyncer>\n private getScrollSyncersByColumn: MemoizeHashFunc<HTMLElement[], ScrollSyncer>\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.getStickyScrolling = memoizeArraylike(initStickyScrolling)\n this.getScrollSyncersBySection = memoizeHashlike(initScrollSyncer.bind(this, true), null, destroyScrollSyncer)\n this.getScrollSyncersByColumn = memoizeHashlike(initScrollSyncer.bind(this, false), null, destroyScrollSyncer)\n\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.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 this.getStickyScrolling(argsByKey)\n .forEach((stickyScrolling) => stickyScrolling.updateSize())\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"],"names":[],"mappings":";;;AAEA;AACM,SAAU,qBAAqB,CAAC,QAAqB,EAAA;AACzD,IAAA,IAAI,IAAI,GAAG,QAAQ,CAAC,qBAAqB,EAAE,CAAA;IAC3C,IAAI,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;IAElC,OAAO;AACL,QAAA,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,UAAU,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