@fullcalendar/scrollgrid 7.0.0-beta.3 → 7.0.0-beta.5
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/LICENSE.md +2 -2
- package/{index.cjs → cjs/index.cjs} +5 -5
- package/{internal.cjs → cjs/internal.cjs} +24 -9
- package/{index.js → esm/index.js} +4 -4
- package/{internal.d.ts → esm/internal.d.ts} +4 -2
- package/{internal.js → esm/internal.js} +22 -7
- package/{index.global.js → global.js} +24 -9
- package/global.min.js +6 -0
- package/package.json +23 -20
- package/index.global.min.js +0 -6
- /package/{index.d.ts → esm/index.d.ts} +0 -0
package/LICENSE.md
CHANGED
|
@@ -13,6 +13,6 @@ one of three licenses to use. Here is a summary of those licenses:
|
|
|
13
13
|
(intended for trial and non-commercial use)
|
|
14
14
|
https://creativecommons.org/licenses/by-nc-nd/4.0/
|
|
15
15
|
|
|
16
|
-
-
|
|
16
|
+
- AGPLv3 License
|
|
17
17
|
(intended for open-source projects)
|
|
18
|
-
|
|
18
|
+
https://www.gnu.org/licenses/agpl-3.0.en.html
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var premiumCommonPlugin = require('@fullcalendar/premium-common
|
|
5
|
+
var core = require('@fullcalendar/core');
|
|
6
|
+
var premiumCommonPlugin = require('@fullcalendar/premium-common');
|
|
7
7
|
var internalCommon = require('./internal.cjs');
|
|
8
|
-
require('@fullcalendar/core/internal
|
|
8
|
+
require('@fullcalendar/core/internal');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
12
|
var premiumCommonPlugin__default = /*#__PURE__*/_interopDefaultLegacy(premiumCommonPlugin);
|
|
13
13
|
|
|
14
|
-
var index =
|
|
14
|
+
var index = core.createPlugin({
|
|
15
15
|
name: '@fullcalendar/scrollgrid',
|
|
16
|
-
premiumReleaseDate: '
|
|
16
|
+
premiumReleaseDate: '2025-12-20',
|
|
17
17
|
deps: [premiumCommonPlugin__default["default"]],
|
|
18
18
|
scrollerSyncerClass: internalCommon.ScrollerSyncer
|
|
19
19
|
});
|
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var internal = require('@fullcalendar/core/internal');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
|
|
9
|
-
- scrollEnd: (x, y) => void
|
|
8
|
+
TODO: detangle and use from @full-ui/headless-grid
|
|
10
9
|
*/
|
|
11
10
|
class ScrollerSyncer {
|
|
12
11
|
constructor(isHorizontal = false) {
|
|
13
12
|
this.isHorizontal = isHorizontal;
|
|
14
|
-
this.emitter = new
|
|
13
|
+
this.emitter = new internal.Emitter();
|
|
15
14
|
this.scrollers = [];
|
|
16
15
|
this.destroyFuncs = [];
|
|
17
16
|
this.isPaused = false;
|
|
18
17
|
}
|
|
19
18
|
handleChildren(scrollers) {
|
|
20
|
-
if (!
|
|
19
|
+
if (!internal.isArraysEqual(this.scrollers, scrollers)) {
|
|
21
20
|
this.destroy();
|
|
22
21
|
for (const scroller of scrollers) {
|
|
23
22
|
if (scroller) { // could be null
|
|
@@ -58,9 +57,9 @@ class ScrollerSyncer {
|
|
|
58
57
|
}
|
|
59
58
|
bindScroller(scroller) {
|
|
60
59
|
let { isHorizontal } = this;
|
|
61
|
-
const onScroll = (
|
|
60
|
+
const onScroll = (isUser) => {
|
|
62
61
|
if (!this.isPaused) {
|
|
63
|
-
if (!this.masterScroller || (this.masterScroller !== scroller &&
|
|
62
|
+
if (!this.masterScroller || (this.masterScroller !== scroller && isUser)) {
|
|
64
63
|
this.assignMaster(scroller);
|
|
65
64
|
}
|
|
66
65
|
if (this.masterScroller === scroller) { // dealing with current
|
|
@@ -78,10 +77,26 @@ class ScrollerSyncer {
|
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
};
|
|
81
|
-
const onScrollEnd = () => {
|
|
80
|
+
const onScrollEnd = (isUser) => {
|
|
82
81
|
if (this.masterScroller === scroller) {
|
|
83
82
|
this.masterScroller = null;
|
|
84
|
-
|
|
83
|
+
const { x, y } = this; // new values
|
|
84
|
+
let isMoved = false;
|
|
85
|
+
if (this.isHorizontal) {
|
|
86
|
+
if (x !== this.prevX) {
|
|
87
|
+
this.prevX = x;
|
|
88
|
+
isMoved = true;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
if (y !== this.prevY) {
|
|
93
|
+
this.prevY = y;
|
|
94
|
+
isMoved = true;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (isMoved) {
|
|
98
|
+
this.emitter.trigger('scrollEnd', isUser);
|
|
99
|
+
}
|
|
85
100
|
}
|
|
86
101
|
};
|
|
87
102
|
scroller.listener.emitter.on('scroll', onScroll);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createPlugin } from '@fullcalendar/core
|
|
2
|
-
import premiumCommonPlugin from '@fullcalendar/premium-common
|
|
1
|
+
import { createPlugin } from '@fullcalendar/core';
|
|
2
|
+
import premiumCommonPlugin from '@fullcalendar/premium-common';
|
|
3
3
|
import { ScrollerSyncer } from './internal.js';
|
|
4
|
-
import '@fullcalendar/core/internal
|
|
4
|
+
import '@fullcalendar/core/internal';
|
|
5
5
|
|
|
6
6
|
var index = createPlugin({
|
|
7
7
|
name: '@fullcalendar/scrollgrid',
|
|
8
|
-
premiumReleaseDate: '
|
|
8
|
+
premiumReleaseDate: '2025-12-20',
|
|
9
9
|
deps: [premiumCommonPlugin],
|
|
10
10
|
scrollerSyncerClass: ScrollerSyncer
|
|
11
11
|
});
|
|
@@ -7,6 +7,8 @@ declare class ScrollerSyncer implements ScrollerSyncerInterface {
|
|
|
7
7
|
private destroyFuncs;
|
|
8
8
|
private masterScroller;
|
|
9
9
|
private isPaused;
|
|
10
|
+
private prevX;
|
|
11
|
+
private prevY;
|
|
10
12
|
constructor(isHorizontal?: boolean);
|
|
11
13
|
handleChildren(scrollers: Scroller[]): void;
|
|
12
14
|
destroy(): void;
|
|
@@ -16,8 +18,8 @@ declare class ScrollerSyncer implements ScrollerSyncerInterface {
|
|
|
16
18
|
x?: number;
|
|
17
19
|
y?: number;
|
|
18
20
|
}): void;
|
|
19
|
-
addScrollEndListener(handler: (
|
|
20
|
-
removeScrollEndListener(handler: (
|
|
21
|
+
addScrollEndListener(handler: (isUser: boolean) => void): void;
|
|
22
|
+
removeScrollEndListener(handler: (isUser: boolean) => void): void;
|
|
21
23
|
bindScroller(scroller: Scroller): () => void;
|
|
22
24
|
assignMaster(masterScroller: Scroller): void;
|
|
23
25
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Emitter, isArraysEqual } from '@fullcalendar/core/internal
|
|
1
|
+
import { Emitter, isArraysEqual } from '@fullcalendar/core/internal';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
|
|
5
|
-
- scrollEnd: (x, y) => void
|
|
4
|
+
TODO: detangle and use from @full-ui/headless-grid
|
|
6
5
|
*/
|
|
7
6
|
class ScrollerSyncer {
|
|
8
7
|
constructor(isHorizontal = false) {
|
|
@@ -54,9 +53,9 @@ class ScrollerSyncer {
|
|
|
54
53
|
}
|
|
55
54
|
bindScroller(scroller) {
|
|
56
55
|
let { isHorizontal } = this;
|
|
57
|
-
const onScroll = (
|
|
56
|
+
const onScroll = (isUser) => {
|
|
58
57
|
if (!this.isPaused) {
|
|
59
|
-
if (!this.masterScroller || (this.masterScroller !== scroller &&
|
|
58
|
+
if (!this.masterScroller || (this.masterScroller !== scroller && isUser)) {
|
|
60
59
|
this.assignMaster(scroller);
|
|
61
60
|
}
|
|
62
61
|
if (this.masterScroller === scroller) { // dealing with current
|
|
@@ -74,10 +73,26 @@ class ScrollerSyncer {
|
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
};
|
|
77
|
-
const onScrollEnd = () => {
|
|
76
|
+
const onScrollEnd = (isUser) => {
|
|
78
77
|
if (this.masterScroller === scroller) {
|
|
79
78
|
this.masterScroller = null;
|
|
80
|
-
|
|
79
|
+
const { x, y } = this; // new values
|
|
80
|
+
let isMoved = false;
|
|
81
|
+
if (this.isHorizontal) {
|
|
82
|
+
if (x !== this.prevX) {
|
|
83
|
+
this.prevX = x;
|
|
84
|
+
isMoved = true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
if (y !== this.prevY) {
|
|
89
|
+
this.prevY = y;
|
|
90
|
+
isMoved = true;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (isMoved) {
|
|
94
|
+
this.emitter.trigger('scrollEnd', isUser);
|
|
95
|
+
}
|
|
81
96
|
}
|
|
82
97
|
};
|
|
83
98
|
scroller.listener.emitter.on('scroll', onScroll);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar ScrollGrid Plugin v7.0.0-beta.
|
|
2
|
+
FullCalendar ScrollGrid Plugin v7.0.0-beta.5
|
|
3
3
|
Docs & License: https://fullcalendar.io/docs/premium
|
|
4
|
-
(c)
|
|
4
|
+
(c) 2025 Adam Shaw
|
|
5
5
|
*/
|
|
6
6
|
FullCalendar.ScrollGrid = (function (exports, core, premiumCommonPlugin, internal$1) {
|
|
7
7
|
'use strict';
|
|
@@ -11,8 +11,7 @@ FullCalendar.ScrollGrid = (function (exports, core, premiumCommonPlugin, interna
|
|
|
11
11
|
var premiumCommonPlugin__default = /*#__PURE__*/_interopDefault(premiumCommonPlugin);
|
|
12
12
|
|
|
13
13
|
/*
|
|
14
|
-
|
|
15
|
-
- scrollEnd: (x, y) => void
|
|
14
|
+
TODO: detangle and use from @full-ui/headless-grid
|
|
16
15
|
*/
|
|
17
16
|
class ScrollerSyncer {
|
|
18
17
|
constructor(isHorizontal = false) {
|
|
@@ -64,9 +63,9 @@ FullCalendar.ScrollGrid = (function (exports, core, premiumCommonPlugin, interna
|
|
|
64
63
|
}
|
|
65
64
|
bindScroller(scroller) {
|
|
66
65
|
let { isHorizontal } = this;
|
|
67
|
-
const onScroll = (
|
|
66
|
+
const onScroll = (isUser) => {
|
|
68
67
|
if (!this.isPaused) {
|
|
69
|
-
if (!this.masterScroller || (this.masterScroller !== scroller &&
|
|
68
|
+
if (!this.masterScroller || (this.masterScroller !== scroller && isUser)) {
|
|
70
69
|
this.assignMaster(scroller);
|
|
71
70
|
}
|
|
72
71
|
if (this.masterScroller === scroller) { // dealing with current
|
|
@@ -84,10 +83,26 @@ FullCalendar.ScrollGrid = (function (exports, core, premiumCommonPlugin, interna
|
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
};
|
|
87
|
-
const onScrollEnd = () => {
|
|
86
|
+
const onScrollEnd = (isUser) => {
|
|
88
87
|
if (this.masterScroller === scroller) {
|
|
89
88
|
this.masterScroller = null;
|
|
90
|
-
|
|
89
|
+
const { x, y } = this; // new values
|
|
90
|
+
let isMoved = false;
|
|
91
|
+
if (this.isHorizontal) {
|
|
92
|
+
if (x !== this.prevX) {
|
|
93
|
+
this.prevX = x;
|
|
94
|
+
isMoved = true;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
if (y !== this.prevY) {
|
|
99
|
+
this.prevY = y;
|
|
100
|
+
isMoved = true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (isMoved) {
|
|
104
|
+
this.emitter.trigger('scrollEnd', isUser);
|
|
105
|
+
}
|
|
91
106
|
}
|
|
92
107
|
};
|
|
93
108
|
scroller.listener.emitter.on('scroll', onScroll);
|
|
@@ -109,7 +124,7 @@ FullCalendar.ScrollGrid = (function (exports, core, premiumCommonPlugin, interna
|
|
|
109
124
|
|
|
110
125
|
var plugin = core.createPlugin({
|
|
111
126
|
name: '@fullcalendar/scrollgrid',
|
|
112
|
-
premiumReleaseDate: '
|
|
127
|
+
premiumReleaseDate: '2025-12-20',
|
|
113
128
|
deps: [premiumCommonPlugin__default["default"]],
|
|
114
129
|
scrollerSyncerClass: ScrollerSyncer
|
|
115
130
|
});
|
package/global.min.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
FullCalendar ScrollGrid Plugin v7.0.0-beta.5
|
|
3
|
+
Docs & License: https://fullcalendar.io/docs/premium
|
|
4
|
+
(c) 2025 Adam Shaw
|
|
5
|
+
*/
|
|
6
|
+
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-12-20",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);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullcalendar/scrollgrid",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.5",
|
|
4
4
|
"title": "FullCalendar ScrollGrid Plugin",
|
|
5
5
|
"description": "Tabular data chunked into scrollable panes",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@fullcalendar/premium-common": "7.0.0-beta.
|
|
7
|
+
"@fullcalendar/premium-common": "7.0.0-beta.5"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@fullcalendar/core": "7.0.0-beta.
|
|
10
|
+
"@fullcalendar/core": "7.0.0-beta.5"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
13
|
"keywords": [
|
|
@@ -31,28 +31,31 @@
|
|
|
31
31
|
"email": "arshaw@arshaw.com",
|
|
32
32
|
"url": "http://arshaw.com/"
|
|
33
33
|
},
|
|
34
|
-
"copyright": "
|
|
35
|
-
"types": "./index.d.ts",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"unpkg": "./
|
|
39
|
-
"jsdelivr": "./
|
|
34
|
+
"copyright": "2025 Adam Shaw",
|
|
35
|
+
"types": "./esm/index.d.ts",
|
|
36
|
+
"module": "./esm/index.js",
|
|
37
|
+
"main": "./cjs/index.cjs",
|
|
38
|
+
"unpkg": "./global.min.js",
|
|
39
|
+
"jsdelivr": "./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
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
"import": {
|
|
44
|
+
"types": "./esm/index.d.ts",
|
|
45
|
+
"default": "./esm/index.js"
|
|
46
|
+
},
|
|
47
|
+
"require": "./cjs/index.cjs"
|
|
48
48
|
},
|
|
49
|
-
"./internal.cjs": "./internal.cjs",
|
|
50
|
-
"./internal.js": "./internal.js",
|
|
51
49
|
"./internal": {
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./esm/internal.d.ts",
|
|
52
|
+
"default": "./esm/internal.js"
|
|
53
|
+
},
|
|
54
|
+
"require": "./cjs/internal.cjs"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"sideEffects":
|
|
57
|
+
"sideEffects": [
|
|
58
|
+
"./global.js",
|
|
59
|
+
"./global.min.js"
|
|
60
|
+
]
|
|
58
61
|
}
|
package/index.global.min.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
FullCalendar ScrollGrid Plugin v7.0.0-beta.3
|
|
3
|
-
Docs & License: https://fullcalendar.io/docs/premium
|
|
4
|
-
(c) 2024 Adam Shaw
|
|
5
|
-
*/
|
|
6
|
-
FullCalendar.ScrollGrid=function(r,s,l,e){"use strict";function t(r){return r&&r.__esModule?r:{default:r}}var o=t(l);class i{constructor(r=!1){this.isHorizontal=r,this.emitter=new e.Emitter,this.scrollers=[],this.destroyFuncs=[],this.isPaused=!1}handleChildren(r){if(!e.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 l of s)l.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 l=(l,e)=>{if(!this.isPaused&&((!this.masterScroller||this.masterScroller!==r&&(l||e))&&this.assignMaster(r),this.masterScroller===r))for(let l of this.scrollers)l!==r&&(s?l.scrollTo({x:r.x}):l.scrollTo({y:r.y}))},e=()=>{this.masterScroller===r&&(this.masterScroller=null,this.emitter.trigger("scrollEnd",this.x,this.y))};return r.listener.emitter.on("scroll",l),r.listener.emitter.on("scrollEnd",e),()=>{r.listener.emitter.off("scroll",l),r.listener.emitter.off("scrollEnd",e)}}assignMaster(r){this.masterScroller=r;for(let s of this.scrollers)s!==r&&s.endScroll()}}var n=s.createPlugin({name:"@fullcalendar/scrollgrid",premiumReleaseDate:"2024-12-19",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);
|
|
File without changes
|