@fullcalendar/scrollgrid
Advanced tools
Comparing version 7.0.0-beta.4 to 7.0.0-rc.0
/*! | ||
FullCalendar ScrollGrid Plugin v7.0.0-beta.4 | ||
FullCalendar ScrollGrid Plugin v7.0.0-rc.0 | ||
Docs & License: https://fullcalendar.io/docs/premium | ||
@@ -13,6 +13,2 @@ (c) 2024 Adam Shaw | ||
/* | ||
Fires: | ||
- scrollEnd: ({ x, y, isUser }) => void | ||
*/ | ||
class ScrollerSyncer { | ||
@@ -106,7 +102,3 @@ constructor(isHorizontal = false) { | ||
if (isMoved) { | ||
this.emitter.trigger('scrollEnd', { | ||
x, | ||
y, | ||
isUser, | ||
}); | ||
this.emitter.trigger('scrollEnd', isUser); | ||
} | ||
@@ -134,3 +126,3 @@ } | ||
name: '@fullcalendar/scrollgrid', | ||
premiumReleaseDate: '2025-01-09', | ||
premiumReleaseDate: '2025-02-21', | ||
deps: [premiumCommonPlugin__default["default"]], | ||
@@ -137,0 +129,0 @@ scrollerSyncerClass: ScrollerSyncer |
/*! | ||
FullCalendar ScrollGrid Plugin v7.0.0-beta.4 | ||
FullCalendar ScrollGrid Plugin v7.0.0-rc.0 | ||
Docs & License: https://fullcalendar.io/docs/premium | ||
(c) 2024 Adam Shaw | ||
*/ | ||
FullCalendar.ScrollGrid=function(r,s,e,l){"use strict";function t(r){return r&&r.__esModule?r:{default:r}}var o=t(e);class i{constructor(r=!1){this.isHorizontal=r,this.emitter=new l.Emitter,this.scrollers=[],this.destroyFuncs=[],this.isPaused=!1}handleChildren(r){if(!l.isArraysEqual(this.scrollers,r)){this.destroy();for(const s of r)s&&(this.destroyFuncs.push(this.bindScroller(s)),this.scrollers.push(s))}}destroy(){for(let r of this.destroyFuncs)r();this.destroyFuncs=[],this.scrollers=[]}get x(){const{scrollers:r,masterScroller:s}=this;return(s||r[0]).x}get y(){const{scrollers:r,masterScroller:s}=this;return(s||r[0]).y}scrollTo(r){this.isPaused=!0;const{scrollers:s}=this;for(let e of s)e.scrollTo(r);this.isPaused=!1}addScrollEndListener(r){this.emitter.on("scrollEnd",r)}removeScrollEndListener(r){this.emitter.off("scrollEnd",r)}bindScroller(r){let{isHorizontal:s}=this;const e=e=>{if(!this.isPaused&&((!this.masterScroller||this.masterScroller!==r&&e)&&this.assignMaster(r),this.masterScroller===r))for(let e of this.scrollers)e!==r&&(s?e.scrollTo({x:r.x}):e.scrollTo({y:r.y}))},l=s=>{if(this.masterScroller===r){this.masterScroller=null;const{x:r,y:e}=this;let l=!1;this.isHorizontal?r!==this.prevX&&(this.prevX=r,l=!0):e!==this.prevY&&(this.prevY=e,l=!0),l&&this.emitter.trigger("scrollEnd",{x:r,y:e,isUser:s})}};return r.listener.emitter.on("scroll",e),r.listener.emitter.on("scrollEnd",l),()=>{r.listener.emitter.off("scroll",e),r.listener.emitter.off("scrollEnd",l)}}assignMaster(r){this.masterScroller=r;for(let s of this.scrollers)s!==r&&s.endScroll()}}var n=s.createPlugin({name:"@fullcalendar/scrollgrid",premiumReleaseDate:"2025-01-09",deps:[o.default],scrollerSyncerClass:i}),c={__proto__:null,ScrollerSyncer:i};return s.globalPlugins.push(n),r.Internal=c,r.default=n,Object.defineProperty(r,"__esModule",{value:!0}),r}({},FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Internal); | ||
FullCalendar.ScrollGrid=function(r,s,e,l){"use strict";function t(r){return r&&r.__esModule?r:{default:r}}var o=t(e);class i{constructor(r=!1){this.isHorizontal=r,this.emitter=new l.Emitter,this.scrollers=[],this.destroyFuncs=[],this.isPaused=!1}handleChildren(r){if(!l.isArraysEqual(this.scrollers,r)){this.destroy();for(const s of r)s&&(this.destroyFuncs.push(this.bindScroller(s)),this.scrollers.push(s))}}destroy(){for(let r of this.destroyFuncs)r();this.destroyFuncs=[],this.scrollers=[]}get x(){const{scrollers:r,masterScroller:s}=this;return(s||r[0]).x}get y(){const{scrollers:r,masterScroller:s}=this;return(s||r[0]).y}scrollTo(r){this.isPaused=!0;const{scrollers:s}=this;for(let e of s)e.scrollTo(r);this.isPaused=!1}addScrollEndListener(r){this.emitter.on("scrollEnd",r)}removeScrollEndListener(r){this.emitter.off("scrollEnd",r)}bindScroller(r){let{isHorizontal:s}=this;const e=e=>{if(!this.isPaused&&((!this.masterScroller||this.masterScroller!==r&&e)&&this.assignMaster(r),this.masterScroller===r))for(let e of this.scrollers)e!==r&&(s?e.scrollTo({x:r.x}):e.scrollTo({y:r.y}))},l=s=>{if(this.masterScroller===r){this.masterScroller=null;const{x:r,y:e}=this;let l=!1;this.isHorizontal?r!==this.prevX&&(this.prevX=r,l=!0):e!==this.prevY&&(this.prevY=e,l=!0),l&&this.emitter.trigger("scrollEnd",s)}};return r.listener.emitter.on("scroll",e),r.listener.emitter.on("scrollEnd",l),()=>{r.listener.emitter.off("scroll",e),r.listener.emitter.off("scrollEnd",l)}}assignMaster(r){this.masterScroller=r;for(let s of this.scrollers)s!==r&&s.endScroll()}}var n=s.createPlugin({name:"@fullcalendar/scrollgrid",premiumReleaseDate:"2025-02-21",deps:[o.default],scrollerSyncerClass:i}),c={__proto__:null,ScrollerSyncer:i};return s.globalPlugins.push(n),r.Internal=c,r.default=n,Object.defineProperty(r,"__esModule",{value:!0}),r}({},FullCalendar,FullCalendar.PremiumCommon,FullCalendar.Internal); |
@@ -8,3 +8,3 @@ import { createPlugin } from '@fullcalendar/core/index.js'; | ||
name: '@fullcalendar/scrollgrid', | ||
premiumReleaseDate: '2025-01-09', | ||
premiumReleaseDate: '2025-02-21', | ||
deps: [premiumCommonPlugin], | ||
@@ -11,0 +11,0 @@ scrollerSyncerClass: ScrollerSyncer |
@@ -21,12 +21,4 @@ import { ScrollerSyncerInterface, Scroller } from '@fullcalendar/core/internal'; | ||
}): void; | ||
addScrollEndListener(handler: (arg: { | ||
x: number; | ||
y: number; | ||
isUser: boolean; | ||
}) => void): void; | ||
removeScrollEndListener(handler: (arg: { | ||
x: number; | ||
y: number; | ||
isUser: boolean; | ||
}) => void): void; | ||
addScrollEndListener(handler: (isUser: boolean) => void): void; | ||
removeScrollEndListener(handler: (isUser: boolean) => void): void; | ||
bindScroller(scroller: Scroller): () => void; | ||
@@ -33,0 +25,0 @@ assignMaster(masterScroller: Scroller): void; |
import { Emitter, isArraysEqual } from '@fullcalendar/core/internal.js'; | ||
/* | ||
Fires: | ||
- scrollEnd: ({ x, y, isUser }) => void | ||
*/ | ||
class ScrollerSyncer { | ||
@@ -95,7 +91,3 @@ constructor(isHorizontal = false) { | ||
if (isMoved) { | ||
this.emitter.trigger('scrollEnd', { | ||
x, | ||
y, | ||
isUser, | ||
}); | ||
this.emitter.trigger('scrollEnd', isUser); | ||
} | ||
@@ -102,0 +94,0 @@ } |
@@ -16,4 +16,4 @@ | ||
- GPLv3 License | ||
- AGPLv3 License | ||
(intended for open-source projects) | ||
http://www.gnu.org/licenses/gpl-3.0.en.html | ||
https://www.gnu.org/licenses/agpl-3.0.en.html |
{ | ||
"name": "@fullcalendar/scrollgrid", | ||
"version": "7.0.0-beta.4", | ||
"version": "7.0.0-rc.0", | ||
"title": "FullCalendar ScrollGrid Plugin", | ||
"description": "Tabular data chunked into scrollable panes", | ||
"dependencies": { | ||
"@fullcalendar/premium-common": "7.0.0-beta.4" | ||
"@fullcalendar/premium-common": "7.0.0-rc.0" | ||
}, | ||
"peerDependencies": { | ||
"@fullcalendar/core": "7.0.0-beta.4" | ||
"@fullcalendar/core": "7.0.0-rc.0" | ||
}, | ||
@@ -12,0 +12,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19666
417
+ Added@fullcalendar/core@7.0.0-rc.0(transitive)
+ Added@fullcalendar/premium-common@7.0.0-rc.0(transitive)
- Removed@fullcalendar/core@7.0.0-beta.4(transitive)
- Removed@fullcalendar/premium-common@7.0.0-beta.4(transitive)