@fullcalendar/core 6.0.3 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{index.esm.js → index.cjs} +210 -174
- package/index.d.ts +1 -1
- package/index.global.js +294 -151
- package/index.global.min.js +3 -3
- package/index.js +199 -185
- package/{internal-common.esm.js → internal-common.cjs} +5143 -4788
- package/internal-common.d.ts +45 -25
- package/internal-common.js +4918 -5036
- package/internal.cjs +196 -0
- package/internal.d.ts +1 -1
- package/internal.js +3 -196
- package/locales/{af.esm.js → af.cjs} +5 -1
- package/locales/af.global.js +2 -2
- package/locales/af.global.min.js +2 -2
- package/locales/af.js +1 -5
- package/locales/{ar-dz.esm.js → ar-dz.cjs} +6 -1
- package/locales/ar-dz.global.js +3 -2
- package/locales/ar-dz.global.min.js +3 -3
- package/locales/ar-dz.js +2 -5
- package/locales/{ar-kw.esm.js → ar-kw.cjs} +6 -1
- package/locales/ar-kw.global.js +3 -2
- package/locales/ar-kw.global.min.js +3 -3
- package/locales/ar-kw.js +2 -5
- package/locales/{ar-ly.esm.js → ar-ly.cjs} +6 -1
- package/locales/ar-ly.global.js +3 -2
- package/locales/ar-ly.global.min.js +3 -3
- package/locales/ar-ly.js +2 -5
- package/locales/{ar-ma.esm.js → ar-ma.cjs} +6 -1
- package/locales/ar-ma.global.js +3 -2
- package/locales/ar-ma.global.min.js +3 -3
- package/locales/ar-ma.js +2 -5
- package/locales/{ar-sa.esm.js → ar-sa.cjs} +6 -1
- package/locales/ar-sa.global.js +3 -2
- package/locales/ar-sa.global.min.js +3 -3
- package/locales/ar-sa.js +2 -5
- package/locales/{ar-tn.esm.js → ar-tn.cjs} +6 -1
- package/locales/ar-tn.global.js +3 -2
- package/locales/ar-tn.global.min.js +3 -3
- package/locales/ar-tn.js +2 -5
- package/locales/{ar.esm.js → ar.cjs} +6 -1
- package/locales/ar.global.js +3 -2
- package/locales/ar.global.min.js +3 -3
- package/locales/ar.js +2 -5
- package/locales/{az.esm.js → az.cjs} +6 -1
- package/locales/az.global.js +3 -2
- package/locales/az.global.min.js +3 -3
- package/locales/az.js +2 -5
- package/locales/{bg.esm.js → bg.cjs} +6 -1
- package/locales/bg.global.js +3 -2
- package/locales/bg.global.min.js +3 -3
- package/locales/bg.js +2 -5
- package/locales/{bn.esm.js → bn.cjs} +6 -1
- package/locales/bn.global.js +3 -2
- package/locales/bn.global.min.js +3 -3
- package/locales/bn.js +2 -5
- package/locales/{bs.esm.js → bs.cjs} +6 -1
- package/locales/bs.global.js +3 -2
- package/locales/bs.global.min.js +3 -3
- package/locales/bs.js +2 -5
- package/locales/{ca.esm.js → ca.cjs} +6 -1
- package/locales/ca.global.js +3 -2
- package/locales/ca.global.min.js +3 -3
- package/locales/ca.js +2 -5
- package/locales/{cs.esm.js → cs.cjs} +6 -1
- package/locales/cs.global.js +3 -2
- package/locales/cs.global.min.js +3 -3
- package/locales/cs.js +2 -5
- package/locales/{cy.esm.js → cy.cjs} +5 -1
- package/locales/cy.global.js +2 -2
- package/locales/cy.global.min.js +2 -2
- package/locales/cy.js +1 -5
- package/locales/{da.esm.js → da.cjs} +6 -1
- package/locales/da.global.js +3 -2
- package/locales/da.global.min.js +3 -3
- package/locales/da.js +2 -5
- package/locales/{de-at.esm.js → de-at.cjs} +5 -1
- package/locales/de-at.global.js +2 -2
- package/locales/de-at.global.min.js +2 -2
- package/locales/de-at.js +1 -5
- package/locales/{de.esm.js → de.cjs} +5 -1
- package/locales/de.global.js +2 -2
- package/locales/de.global.min.js +2 -2
- package/locales/de.js +1 -5
- package/locales/{el.esm.js → el.cjs} +6 -1
- package/locales/el.global.js +3 -2
- package/locales/el.global.min.js +3 -3
- package/locales/el.js +2 -5
- package/locales/{en-au.esm.js → en-au.cjs} +5 -1
- package/locales/en-au.global.js +2 -2
- package/locales/en-au.global.min.js +2 -2
- package/locales/en-au.js +1 -5
- package/locales/{en-gb.esm.js → en-gb.cjs} +5 -1
- package/locales/en-gb.global.js +2 -2
- package/locales/en-gb.global.min.js +2 -2
- package/locales/en-gb.js +1 -5
- package/locales/{en-nz.esm.js → en-nz.cjs} +5 -1
- package/locales/en-nz.global.js +2 -2
- package/locales/en-nz.global.min.js +2 -2
- package/locales/en-nz.js +1 -5
- package/locales/{eo.esm.js → eo.cjs} +6 -1
- package/locales/eo.global.js +3 -2
- package/locales/eo.global.min.js +3 -3
- package/locales/eo.js +2 -5
- package/locales/{es-us.esm.js → es-us.cjs} +6 -1
- package/locales/es-us.global.js +3 -2
- package/locales/es-us.global.min.js +3 -3
- package/locales/es-us.js +2 -5
- package/locales/{es.esm.js → es.cjs} +6 -1
- package/locales/es.global.js +3 -2
- package/locales/es.global.min.js +3 -3
- package/locales/es.js +2 -5
- package/locales/{et.esm.js → et.cjs} +6 -1
- package/locales/et.global.js +3 -2
- package/locales/et.global.min.js +3 -3
- package/locales/et.js +2 -5
- package/locales/{eu.esm.js → eu.cjs} +6 -1
- package/locales/eu.global.js +3 -2
- package/locales/eu.global.min.js +3 -3
- package/locales/eu.js +2 -5
- package/locales/{fa.esm.js → fa.cjs} +6 -1
- package/locales/fa.global.js +3 -2
- package/locales/fa.global.min.js +3 -3
- package/locales/fa.js +2 -5
- package/locales/{fi.esm.js → fi.cjs} +6 -1
- package/locales/fi.global.js +3 -2
- package/locales/fi.global.min.js +3 -3
- package/locales/fi.js +2 -5
- package/locales/{fr-ca.esm.js → fr-ca.cjs} +6 -2
- package/locales/fr-ca.global.js +3 -3
- package/locales/fr-ca.global.min.js +3 -3
- package/locales/fr-ca.js +2 -6
- package/locales/{fr-ch.esm.js → fr-ch.cjs} +6 -2
- package/locales/fr-ch.global.js +3 -3
- package/locales/fr-ch.global.min.js +3 -3
- package/locales/fr-ch.js +2 -6
- package/locales/{fr.esm.js → fr.cjs} +7 -2
- package/locales/fr.global.js +4 -3
- package/locales/fr.global.min.js +3 -3
- package/locales/fr.js +3 -6
- package/locales/gl.cjs +46 -0
- package/locales/gl.global.js +22 -2
- package/locales/gl.global.min.js +3 -3
- package/locales/gl.js +21 -5
- package/locales/{he.esm.js → he.cjs} +6 -1
- package/locales/he.global.js +3 -2
- package/locales/he.global.min.js +3 -3
- package/locales/he.js +2 -5
- package/locales/{hi.esm.js → hi.cjs} +6 -1
- package/locales/hi.global.js +3 -2
- package/locales/hi.global.min.js +3 -3
- package/locales/hi.js +2 -5
- package/locales/{hr.esm.js → hr.cjs} +6 -1
- package/locales/hr.global.js +3 -2
- package/locales/hr.global.min.js +3 -3
- package/locales/hr.js +2 -5
- package/locales/{hu.esm.js → hu.cjs} +6 -1
- package/locales/hu.global.js +3 -2
- package/locales/hu.global.min.js +3 -3
- package/locales/hu.js +2 -5
- package/locales/{hy-am.esm.js → hy-am.cjs} +6 -1
- package/locales/hy-am.global.js +3 -2
- package/locales/hy-am.global.min.js +3 -3
- package/locales/hy-am.js +2 -5
- package/locales/{id.esm.js → id.cjs} +6 -1
- package/locales/id.global.js +3 -2
- package/locales/id.global.min.js +3 -3
- package/locales/id.js +2 -5
- package/locales/{is.esm.js → is.cjs} +6 -1
- package/locales/is.global.js +3 -2
- package/locales/is.global.min.js +3 -3
- package/locales/is.js +2 -5
- package/locales/{it.esm.js → it.cjs} +6 -1
- package/locales/it.global.js +3 -2
- package/locales/it.global.min.js +3 -3
- package/locales/it.js +2 -5
- package/locales/{ja.esm.js → ja.cjs} +6 -1
- package/locales/ja.global.js +3 -2
- package/locales/ja.global.min.js +3 -3
- package/locales/ja.js +2 -5
- package/locales/{ka.esm.js → ka.cjs} +6 -1
- package/locales/ka.global.js +3 -2
- package/locales/ka.global.min.js +3 -3
- package/locales/ka.js +2 -5
- package/locales/{kk.esm.js → kk.cjs} +6 -1
- package/locales/kk.global.js +3 -2
- package/locales/kk.global.min.js +3 -3
- package/locales/kk.js +2 -5
- package/locales/{km.esm.js → km.cjs} +5 -1
- package/locales/km.global.js +2 -2
- package/locales/km.global.min.js +2 -2
- package/locales/km.js +1 -5
- package/locales/{ko.esm.js → ko.cjs} +6 -1
- package/locales/ko.global.js +3 -2
- package/locales/ko.global.min.js +3 -3
- package/locales/ko.js +2 -5
- package/locales/{ku.esm.js → ku.cjs} +6 -1
- package/locales/ku.global.js +3 -2
- package/locales/ku.global.min.js +3 -3
- package/locales/ku.js +2 -5
- package/locales/{lb.esm.js → lb.cjs} +6 -1
- package/locales/lb.global.js +3 -2
- package/locales/lb.global.min.js +3 -3
- package/locales/lb.js +2 -5
- package/locales/{lt.esm.js → lt.cjs} +6 -1
- package/locales/lt.global.js +3 -2
- package/locales/lt.global.min.js +3 -3
- package/locales/lt.js +2 -5
- package/locales/{lv.esm.js → lv.cjs} +6 -1
- package/locales/lv.global.js +3 -2
- package/locales/lv.global.min.js +3 -3
- package/locales/lv.js +2 -5
- package/locales/{mk.esm.js → mk.cjs} +6 -1
- package/locales/mk.global.js +3 -2
- package/locales/mk.global.min.js +3 -3
- package/locales/mk.js +2 -5
- package/locales/{ms.esm.js → ms.cjs} +6 -1
- package/locales/ms.global.js +3 -2
- package/locales/ms.global.min.js +3 -3
- package/locales/ms.js +2 -5
- package/locales/{nb.esm.js → nb.cjs} +6 -1
- package/locales/nb.global.js +3 -2
- package/locales/nb.global.min.js +3 -3
- package/locales/nb.js +2 -5
- package/locales/{ne.esm.js → ne.cjs} +6 -1
- package/locales/ne.global.js +3 -2
- package/locales/ne.global.min.js +3 -3
- package/locales/ne.js +2 -5
- package/locales/{nl.esm.js → nl.cjs} +5 -1
- package/locales/nl.global.js +2 -2
- package/locales/nl.global.min.js +2 -2
- package/locales/nl.js +1 -5
- package/locales/{nn.esm.js → nn.cjs} +6 -1
- package/locales/nn.global.js +3 -2
- package/locales/nn.global.min.js +3 -3
- package/locales/nn.js +2 -5
- package/locales/{pl.esm.js → pl.cjs} +6 -1
- package/locales/pl.global.js +3 -2
- package/locales/pl.global.min.js +3 -3
- package/locales/pl.js +2 -5
- package/locales/pt-br.cjs +46 -0
- package/locales/pt-br.global.js +24 -2
- package/locales/pt-br.global.min.js +3 -3
- package/locales/pt-br.js +23 -5
- package/locales/{pt.esm.js → pt.cjs} +6 -1
- package/locales/pt.global.js +3 -2
- package/locales/pt.global.min.js +3 -3
- package/locales/pt.js +2 -5
- package/locales/{ro.esm.js → ro.cjs} +6 -1
- package/locales/ro.global.js +3 -2
- package/locales/ro.global.min.js +3 -3
- package/locales/ro.js +2 -5
- package/locales/{ru.esm.js → ru.cjs} +6 -1
- package/locales/ru.global.js +3 -2
- package/locales/ru.global.min.js +3 -3
- package/locales/ru.js +2 -5
- package/locales/{si-lk.esm.js → si-lk.cjs} +6 -1
- package/locales/si-lk.global.js +3 -2
- package/locales/si-lk.global.min.js +3 -3
- package/locales/si-lk.js +2 -5
- package/locales/{sk.esm.js → sk.cjs} +6 -1
- package/locales/sk.global.js +3 -2
- package/locales/sk.global.min.js +3 -3
- package/locales/sk.js +2 -5
- package/locales/{sl.esm.js → sl.cjs} +6 -1
- package/locales/sl.global.js +3 -2
- package/locales/sl.global.min.js +3 -3
- package/locales/sl.js +2 -5
- package/locales/{sm.esm.js → sm.cjs} +6 -1
- package/locales/sm.global.js +3 -2
- package/locales/sm.global.min.js +3 -3
- package/locales/sm.js +2 -5
- package/locales/{sq.esm.js → sq.cjs} +7 -2
- package/locales/sq.global.js +4 -3
- package/locales/sq.global.min.js +3 -3
- package/locales/sq.js +3 -6
- package/locales/{sr-cyrl.esm.js → sr-cyrl.cjs} +6 -1
- package/locales/sr-cyrl.global.js +3 -2
- package/locales/sr-cyrl.global.min.js +3 -3
- package/locales/sr-cyrl.js +2 -5
- package/locales/{sr.esm.js → sr.cjs} +6 -1
- package/locales/sr.global.js +3 -2
- package/locales/sr.global.min.js +3 -3
- package/locales/sr.js +2 -5
- package/locales/{sv.esm.js → sv.cjs} +6 -1
- package/locales/sv.global.js +3 -2
- package/locales/sv.global.min.js +3 -3
- package/locales/sv.js +2 -5
- package/locales/{ta-in.esm.js → ta-in.cjs} +6 -1
- package/locales/ta-in.global.js +3 -2
- package/locales/ta-in.global.min.js +3 -3
- package/locales/ta-in.js +2 -5
- package/locales/{th.esm.js → th.cjs} +5 -1
- package/locales/th.global.js +2 -2
- package/locales/th.global.min.js +2 -2
- package/locales/th.js +1 -5
- package/locales/{tr.esm.js → tr.cjs} +6 -1
- package/locales/tr.global.js +3 -2
- package/locales/tr.global.min.js +3 -3
- package/locales/tr.js +2 -5
- package/locales/ug.cjs +20 -0
- package/locales/ug.global.js +6 -2
- package/locales/ug.global.min.js +3 -3
- package/locales/ug.js +5 -5
- package/locales/{uk.esm.js → uk.cjs} +6 -1
- package/locales/uk.global.js +3 -2
- package/locales/uk.global.min.js +3 -3
- package/locales/uk.js +2 -5
- package/locales/uz-cy.cjs +28 -0
- package/locales/uz-cy.d.ts +6 -0
- package/locales/uz-cy.global.js +34 -0
- package/locales/uz-cy.global.min.js +6 -0
- package/locales/uz-cy.js +24 -0
- package/locales/uz.cjs +28 -0
- package/locales/uz.global.js +10 -2
- package/locales/uz.global.min.js +3 -3
- package/locales/uz.js +10 -6
- package/locales/{vi.esm.js → vi.cjs} +7 -2
- package/locales/vi.global.js +3 -2
- package/locales/vi.global.min.js +3 -3
- package/locales/vi.js +3 -6
- package/locales/{zh-cn.esm.js → zh-cn.cjs} +7 -2
- package/locales/zh-cn.global.js +3 -2
- package/locales/zh-cn.global.min.js +3 -3
- package/locales/zh-cn.js +3 -6
- package/locales/{zh-tw.esm.js → zh-tw.cjs} +7 -2
- package/locales/zh-tw.global.js +3 -2
- package/locales/zh-tw.global.min.js +3 -3
- package/locales/zh-tw.js +3 -6
- package/locales-all.cjs +89 -0
- package/locales-all.global.js +149 -10
- package/locales-all.global.min.js +3 -3
- package/locales-all.js +81 -84
- package/package.json +19 -14
- package/preact.cjs +22 -0
- package/preact.js +3 -22
- package/internal.esm.js +0 -3
- package/locales/gl.esm.js +0 -22
- package/locales/pt-br.esm.js +0 -20
- package/locales/ug.esm.js +0 -12
- package/locales/uz.esm.js +0 -16
- package/locales-all.esm.js +0 -84
- package/preact.esm.js +0 -3
package/index.global.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar Core v6.
|
|
2
|
+
FullCalendar Core v6.1.1
|
|
3
3
|
Docs & License: https://fullcalendar.io
|
|
4
|
-
(c)
|
|
4
|
+
(c) 2023 Adam Shaw
|
|
5
5
|
*/
|
|
6
6
|
var FullCalendar = (function (exports) {
|
|
7
7
|
'use strict';
|
|
@@ -92,11 +92,6 @@ var FullCalendar = (function (exports) {
|
|
|
92
92
|
var _a, _b;
|
|
93
93
|
return (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)[0]) !== null && _b !== void 0 ? _b : ev.target;
|
|
94
94
|
}
|
|
95
|
-
// Shadow DOM consuderations
|
|
96
|
-
// ----------------------------------------------------------------------------------------------------------------
|
|
97
|
-
function getElRoot(el) {
|
|
98
|
-
return el.getRootNode ? el.getRootNode() : document;
|
|
99
|
-
}
|
|
100
95
|
// Unique ID for DOM attribute
|
|
101
96
|
let guid$1 = 0;
|
|
102
97
|
function getUniqueDomId() {
|
|
@@ -477,22 +472,24 @@ var FullCalendar = (function (exports) {
|
|
|
477
472
|
let dest = {};
|
|
478
473
|
if (complexPropsMap) {
|
|
479
474
|
for (let name in complexPropsMap) {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
let
|
|
484
|
-
|
|
485
|
-
|
|
475
|
+
if (complexPropsMap[name] === isMaybeObjectsEqual) { // implies that it's object-mergeable
|
|
476
|
+
let complexObjs = [];
|
|
477
|
+
// collect the trailing object values, stopping when a non-object is discovered
|
|
478
|
+
for (let i = propObjs.length - 1; i >= 0; i -= 1) {
|
|
479
|
+
let val = propObjs[i][name];
|
|
480
|
+
if (typeof val === 'object' && val) { // non-null object
|
|
481
|
+
complexObjs.unshift(val);
|
|
482
|
+
}
|
|
483
|
+
else if (val !== undefined) {
|
|
484
|
+
dest[name] = val; // if there were no objects, this value will be used
|
|
485
|
+
break;
|
|
486
|
+
}
|
|
486
487
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
// if the trailing values were objects, use the merged value
|
|
489
|
+
if (complexObjs.length) {
|
|
490
|
+
dest[name] = mergeProps(complexObjs);
|
|
490
491
|
}
|
|
491
492
|
}
|
|
492
|
-
// if the trailing values were objects, use the merged value
|
|
493
|
-
if (complexObjs.length) {
|
|
494
|
-
dest[name] = mergeProps(complexObjs);
|
|
495
|
-
}
|
|
496
493
|
}
|
|
497
494
|
}
|
|
498
495
|
// copy values into the destination, going from last to first
|
|
@@ -630,6 +627,38 @@ var FullCalendar = (function (exports) {
|
|
|
630
627
|
return res;
|
|
631
628
|
}
|
|
632
629
|
|
|
630
|
+
// TODO: new util arrayify?
|
|
631
|
+
function removeExact(array, exactVal) {
|
|
632
|
+
let removeCnt = 0;
|
|
633
|
+
let i = 0;
|
|
634
|
+
while (i < array.length) {
|
|
635
|
+
if (array[i] === exactVal) {
|
|
636
|
+
array.splice(i, 1);
|
|
637
|
+
removeCnt += 1;
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
i += 1;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return removeCnt;
|
|
644
|
+
}
|
|
645
|
+
function isArraysEqual(a0, a1, equalityFunc) {
|
|
646
|
+
if (a0 === a1) {
|
|
647
|
+
return true;
|
|
648
|
+
}
|
|
649
|
+
let len = a0.length;
|
|
650
|
+
let i;
|
|
651
|
+
if (len !== a1.length) { // not array? or not same length?
|
|
652
|
+
return false;
|
|
653
|
+
}
|
|
654
|
+
for (i = 0; i < len; i += 1) {
|
|
655
|
+
if (!(equalityFunc ? equalityFunc(a0[i], a1[i]) : a0[i] === a1[i])) {
|
|
656
|
+
return false;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
return true;
|
|
660
|
+
}
|
|
661
|
+
|
|
633
662
|
const DAY_IDS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];
|
|
634
663
|
// Adding
|
|
635
664
|
function addWeeks(m, n) {
|
|
@@ -820,6 +849,9 @@ var FullCalendar = (function (exports) {
|
|
|
820
849
|
function formatDayString(marker) {
|
|
821
850
|
return marker.toISOString().replace(/T.*$/, '');
|
|
822
851
|
}
|
|
852
|
+
function formatIsoMonthStr(marker) {
|
|
853
|
+
return marker.toISOString().match(/^\d{4}-\d{2}/)[0];
|
|
854
|
+
}
|
|
823
855
|
// TODO: use Date::toISOString and use everything after the T?
|
|
824
856
|
function formatIsoTimeString(marker) {
|
|
825
857
|
return padStart(marker.getUTCHours(), 2) + ':' +
|
|
@@ -837,38 +869,6 @@ var FullCalendar = (function (exports) {
|
|
|
837
869
|
return `GMT${sign}${hours}${mins ? `:${padStart(mins, 2)}` : ''}`;
|
|
838
870
|
}
|
|
839
871
|
|
|
840
|
-
// TODO: new util arrayify?
|
|
841
|
-
function removeExact(array, exactVal) {
|
|
842
|
-
let removeCnt = 0;
|
|
843
|
-
let i = 0;
|
|
844
|
-
while (i < array.length) {
|
|
845
|
-
if (array[i] === exactVal) {
|
|
846
|
-
array.splice(i, 1);
|
|
847
|
-
removeCnt += 1;
|
|
848
|
-
}
|
|
849
|
-
else {
|
|
850
|
-
i += 1;
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
return removeCnt;
|
|
854
|
-
}
|
|
855
|
-
function isArraysEqual(a0, a1, equalityFunc) {
|
|
856
|
-
if (a0 === a1) {
|
|
857
|
-
return true;
|
|
858
|
-
}
|
|
859
|
-
let len = a0.length;
|
|
860
|
-
let i;
|
|
861
|
-
if (len !== a1.length) { // not array? or not same length?
|
|
862
|
-
return false;
|
|
863
|
-
}
|
|
864
|
-
for (i = 0; i < len; i += 1) {
|
|
865
|
-
if (!(equalityFunc ? equalityFunc(a0[i], a1[i]) : a0[i] === a1[i])) {
|
|
866
|
-
return false;
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
return true;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
872
|
function memoize(workerFunc, resEquality, teardownFunc) {
|
|
873
873
|
let currentArgs;
|
|
874
874
|
let currentRes;
|
|
@@ -1462,7 +1462,6 @@ var FullCalendar = (function (exports) {
|
|
|
1462
1462
|
dateAlignment: String,
|
|
1463
1463
|
dateIncrement: createDuration,
|
|
1464
1464
|
hiddenDays: identity,
|
|
1465
|
-
monthMode: Boolean,
|
|
1466
1465
|
fixedWeekCount: Boolean,
|
|
1467
1466
|
validRange: identity,
|
|
1468
1467
|
visibleRange: identity,
|
|
@@ -1480,6 +1479,7 @@ var FullCalendar = (function (exports) {
|
|
|
1480
1479
|
moreLinkContent: identity,
|
|
1481
1480
|
moreLinkDidMount: identity,
|
|
1482
1481
|
moreLinkWillUnmount: identity,
|
|
1482
|
+
monthStartFormat: createFormatter,
|
|
1483
1483
|
// for connectors
|
|
1484
1484
|
// (can't be part of plugin system b/c must be provided at runtime)
|
|
1485
1485
|
handleCustomRendering: identity,
|
|
@@ -1539,6 +1539,7 @@ var FullCalendar = (function (exports) {
|
|
|
1539
1539
|
eventMinHeight: 15,
|
|
1540
1540
|
eventMinWidth: 30,
|
|
1541
1541
|
eventShortHeight: 30,
|
|
1542
|
+
monthStartFormat: { month: 'long', day: 'numeric' },
|
|
1542
1543
|
};
|
|
1543
1544
|
// calendar listeners
|
|
1544
1545
|
// ------------------
|
|
@@ -1582,6 +1583,10 @@ var FullCalendar = (function (exports) {
|
|
|
1582
1583
|
buttonHints: isMaybeObjectsEqual,
|
|
1583
1584
|
buttonIcons: isMaybeObjectsEqual,
|
|
1584
1585
|
dateIncrement: isMaybeObjectsEqual,
|
|
1586
|
+
plugins: isMaybeArraysEqual,
|
|
1587
|
+
events: isMaybeArraysEqual,
|
|
1588
|
+
eventSources: isMaybeArraysEqual,
|
|
1589
|
+
['resources']: isMaybeArraysEqual,
|
|
1585
1590
|
};
|
|
1586
1591
|
function isMaybeObjectsEqual(a, b) {
|
|
1587
1592
|
if (typeof a === 'object' && typeof b === 'object' && a && b) { // both non-null objects
|
|
@@ -1589,6 +1594,12 @@ var FullCalendar = (function (exports) {
|
|
|
1589
1594
|
}
|
|
1590
1595
|
return a === b;
|
|
1591
1596
|
}
|
|
1597
|
+
function isMaybeArraysEqual(a, b) {
|
|
1598
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
1599
|
+
return isArraysEqual(a, b);
|
|
1600
|
+
}
|
|
1601
|
+
return a === b;
|
|
1602
|
+
}
|
|
1592
1603
|
// view-specific options
|
|
1593
1604
|
// ---------------------
|
|
1594
1605
|
const VIEW_OPTION_REFINERS = {
|
|
@@ -1704,11 +1715,11 @@ var FullCalendar = (function (exports) {
|
|
|
1704
1715
|
return markers;
|
|
1705
1716
|
}
|
|
1706
1717
|
|
|
1707
|
-
function parseEvents(rawEvents, eventSource, context, allowOpenRange) {
|
|
1718
|
+
function parseEvents(rawEvents, eventSource, context, allowOpenRange, defIdMap, instanceIdMap) {
|
|
1708
1719
|
let eventStore = createEmptyEventStore();
|
|
1709
1720
|
let eventRefiners = buildEventRefiners(context);
|
|
1710
1721
|
for (let rawEvent of rawEvents) {
|
|
1711
|
-
let tuple = parseEvent(rawEvent, eventSource, context, allowOpenRange, eventRefiners);
|
|
1722
|
+
let tuple = parseEvent(rawEvent, eventSource, context, allowOpenRange, eventRefiners, defIdMap, instanceIdMap);
|
|
1712
1723
|
if (tuple) {
|
|
1713
1724
|
eventTupleToStore(tuple, eventStore);
|
|
1714
1725
|
}
|
|
@@ -1880,12 +1891,12 @@ var FullCalendar = (function (exports) {
|
|
|
1880
1891
|
allDay: Boolean,
|
|
1881
1892
|
};
|
|
1882
1893
|
const EVENT_REFINERS = Object.assign(Object.assign(Object.assign({}, EVENT_NON_DATE_REFINERS), EVENT_DATE_REFINERS), { extendedProps: identity });
|
|
1883
|
-
function parseEvent(raw, eventSource, context, allowOpenRange, refiners = buildEventRefiners(context)) {
|
|
1894
|
+
function parseEvent(raw, eventSource, context, allowOpenRange, refiners = buildEventRefiners(context), defIdMap, instanceIdMap) {
|
|
1884
1895
|
let { refined, extra } = refineEventDef(raw, context, refiners);
|
|
1885
1896
|
let defaultAllDay = computeIsDefaultAllDay(eventSource, context);
|
|
1886
1897
|
let recurringRes = parseRecurring(refined, defaultAllDay, context.dateEnv, context.pluginHooks.recurringTypes);
|
|
1887
1898
|
if (recurringRes) {
|
|
1888
|
-
let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', recurringRes.allDay, Boolean(recurringRes.duration), context);
|
|
1899
|
+
let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', recurringRes.allDay, Boolean(recurringRes.duration), context, defIdMap);
|
|
1889
1900
|
def.recurringDef = {
|
|
1890
1901
|
typeId: recurringRes.typeId,
|
|
1891
1902
|
typeData: recurringRes.typeData,
|
|
@@ -1895,8 +1906,11 @@ var FullCalendar = (function (exports) {
|
|
|
1895
1906
|
}
|
|
1896
1907
|
let singleRes = parseSingle(refined, defaultAllDay, context, allowOpenRange);
|
|
1897
1908
|
if (singleRes) {
|
|
1898
|
-
let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', singleRes.allDay, singleRes.hasEnd, context);
|
|
1909
|
+
let def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', singleRes.allDay, singleRes.hasEnd, context, defIdMap);
|
|
1899
1910
|
let instance = createEventInstance(def.defId, singleRes.range, singleRes.forcedStartTzo, singleRes.forcedEndTzo);
|
|
1911
|
+
if (instanceIdMap && def.publicId && instanceIdMap[def.publicId]) {
|
|
1912
|
+
instance.instanceId = instanceIdMap[def.publicId];
|
|
1913
|
+
}
|
|
1900
1914
|
return { def, instance };
|
|
1901
1915
|
}
|
|
1902
1916
|
return null;
|
|
@@ -1911,14 +1925,14 @@ var FullCalendar = (function (exports) {
|
|
|
1911
1925
|
Will NOT populate extendedProps with the leftover properties.
|
|
1912
1926
|
Will NOT populate date-related props.
|
|
1913
1927
|
*/
|
|
1914
|
-
function parseEventDef(refined, extra, sourceId, allDay, hasEnd, context) {
|
|
1928
|
+
function parseEventDef(refined, extra, sourceId, allDay, hasEnd, context, defIdMap) {
|
|
1915
1929
|
let def = {
|
|
1916
1930
|
title: refined.title || '',
|
|
1917
1931
|
groupId: refined.groupId || '',
|
|
1918
1932
|
publicId: refined.id || '',
|
|
1919
1933
|
url: refined.url || '',
|
|
1920
1934
|
recurringDef: null,
|
|
1921
|
-
defId: guid(),
|
|
1935
|
+
defId: ((defIdMap && refined.id) ? defIdMap[refined.id] : '') || guid(),
|
|
1922
1936
|
sourceId,
|
|
1923
1937
|
allDay,
|
|
1924
1938
|
hasEnd,
|
|
@@ -3224,7 +3238,12 @@ var FullCalendar = (function (exports) {
|
|
|
3224
3238
|
// it's invalid if the originally requested date is not contained,
|
|
3225
3239
|
// or if the range is completely outside of the valid range.
|
|
3226
3240
|
isValid = rangesIntersect(currentInfo.range, validRange);
|
|
3241
|
+
// HACK: constrain to render-range so `currentDate` is more useful to view rendering
|
|
3242
|
+
if (!rangeContainsMarker(renderRange, currentDate)) {
|
|
3243
|
+
currentDate = renderRange.start;
|
|
3244
|
+
}
|
|
3227
3245
|
return {
|
|
3246
|
+
currentDate,
|
|
3228
3247
|
// constraint for where prev/next operations can go and where events can be dragged/resized to.
|
|
3229
3248
|
// an object with optional start and end properties.
|
|
3230
3249
|
validRange,
|
|
@@ -3910,7 +3929,9 @@ var FullCalendar = (function (exports) {
|
|
|
3910
3929
|
let def = this._def;
|
|
3911
3930
|
let { ui } = def;
|
|
3912
3931
|
let { startStr, endStr } = this;
|
|
3913
|
-
let res = {
|
|
3932
|
+
let res = {
|
|
3933
|
+
allDay: def.allDay,
|
|
3934
|
+
};
|
|
3914
3935
|
if (def.title) {
|
|
3915
3936
|
res.title = def.title;
|
|
3916
3937
|
}
|
|
@@ -5085,8 +5106,8 @@ var FullCalendar = (function (exports) {
|
|
|
5085
5106
|
constructor() {
|
|
5086
5107
|
super(...arguments);
|
|
5087
5108
|
this.id = guid();
|
|
5088
|
-
this.currentDomNodes = [];
|
|
5089
5109
|
this.queuedDomNodes = [];
|
|
5110
|
+
this.currentDomNodes = [];
|
|
5090
5111
|
this.handleEl = (el) => {
|
|
5091
5112
|
if (this.props.elRef) {
|
|
5092
5113
|
setRef(this.props.elRef, el);
|
|
@@ -5096,34 +5117,45 @@ var FullCalendar = (function (exports) {
|
|
|
5096
5117
|
render() {
|
|
5097
5118
|
const { props, context } = this;
|
|
5098
5119
|
const { options } = context;
|
|
5099
|
-
const {
|
|
5120
|
+
const { customGenerator, defaultGenerator, renderProps } = props;
|
|
5100
5121
|
const attrs = buildElAttrs(props);
|
|
5122
|
+
let useDefault = false;
|
|
5101
5123
|
let innerContent;
|
|
5102
5124
|
let queuedDomNodes = [];
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5125
|
+
let currentGeneratorMeta;
|
|
5126
|
+
if (customGenerator != null) {
|
|
5127
|
+
const customGeneratorRes = typeof customGenerator === 'function' ?
|
|
5128
|
+
customGenerator(renderProps, h) :
|
|
5129
|
+
customGenerator;
|
|
5130
|
+
if (customGeneratorRes === true) {
|
|
5131
|
+
useDefault = true;
|
|
5106
5132
|
}
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
generator(renderProps, h) :
|
|
5111
|
-
generator;
|
|
5112
|
-
if (typeof customContent === 'string' ||
|
|
5113
|
-
i$1(customContent) ||
|
|
5114
|
-
Array.isArray(customContent)) {
|
|
5115
|
-
innerContent = customContent;
|
|
5116
|
-
}
|
|
5117
|
-
else if (typeof customContent === 'object') {
|
|
5118
|
-
if ('html' in customContent) {
|
|
5119
|
-
attrs.dangerouslySetInnerHTML = { __html: customContent.html };
|
|
5133
|
+
else {
|
|
5134
|
+
if (options.handleCustomRendering) { // non-Preact (likely React)
|
|
5135
|
+
currentGeneratorMeta = customGeneratorRes;
|
|
5120
5136
|
}
|
|
5121
|
-
else
|
|
5122
|
-
|
|
5137
|
+
else { // preact or { html, domNodes }
|
|
5138
|
+
const isObject = typeof customGeneratorRes === 'object';
|
|
5139
|
+
if (isObject && ('html' in customGeneratorRes)) {
|
|
5140
|
+
attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html };
|
|
5141
|
+
}
|
|
5142
|
+
else if (isObject && ('domNodes' in customGeneratorRes)) {
|
|
5143
|
+
queuedDomNodes = Array.prototype.slice.call(customGeneratorRes.domNodes);
|
|
5144
|
+
}
|
|
5145
|
+
else {
|
|
5146
|
+
innerContent = customGeneratorRes;
|
|
5147
|
+
}
|
|
5123
5148
|
}
|
|
5124
5149
|
}
|
|
5125
5150
|
}
|
|
5151
|
+
else {
|
|
5152
|
+
useDefault = !hasCustomRenderingHandler(props.generatorName, options);
|
|
5153
|
+
}
|
|
5154
|
+
if (useDefault && defaultGenerator) {
|
|
5155
|
+
innerContent = defaultGenerator(renderProps);
|
|
5156
|
+
}
|
|
5126
5157
|
this.queuedDomNodes = queuedDomNodes;
|
|
5158
|
+
this.currentGeneratorMeta = currentGeneratorMeta;
|
|
5127
5159
|
return h(props.elTag, attrs, innerContent);
|
|
5128
5160
|
}
|
|
5129
5161
|
componentDidMount() {
|
|
@@ -5138,12 +5170,14 @@ var FullCalendar = (function (exports) {
|
|
|
5138
5170
|
this.triggerCustomRendering(false); // TODO: different API for removal?
|
|
5139
5171
|
}
|
|
5140
5172
|
triggerCustomRendering(isActive) {
|
|
5173
|
+
var _a;
|
|
5141
5174
|
const { props, context } = this;
|
|
5142
5175
|
const { handleCustomRendering, customRenderingMetaMap } = context.options;
|
|
5143
5176
|
if (handleCustomRendering) {
|
|
5144
|
-
const
|
|
5145
|
-
if (
|
|
5146
|
-
handleCustomRendering(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.handleEl,
|
|
5177
|
+
const generatorMeta = (_a = this.currentGeneratorMeta) !== null && _a !== void 0 ? _a : customRenderingMetaMap === null || customRenderingMetaMap === void 0 ? void 0 : customRenderingMetaMap[props.generatorName];
|
|
5178
|
+
if (generatorMeta) {
|
|
5179
|
+
handleCustomRendering(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.handleEl, // for customRenderingReplacesEl
|
|
5180
|
+
generatorMeta }, props));
|
|
5147
5181
|
}
|
|
5148
5182
|
}
|
|
5149
5183
|
}
|
|
@@ -5166,6 +5200,9 @@ var FullCalendar = (function (exports) {
|
|
|
5166
5200
|
renderProps: isPropsEqual,
|
|
5167
5201
|
});
|
|
5168
5202
|
// Util
|
|
5203
|
+
/*
|
|
5204
|
+
Does UI-framework provide custom way of rendering?
|
|
5205
|
+
*/
|
|
5169
5206
|
function hasCustomRenderingHandler(generatorName, options) {
|
|
5170
5207
|
var _a;
|
|
5171
5208
|
return Boolean(options.handleCustomRendering &&
|
|
@@ -5223,7 +5260,7 @@ var FullCalendar = (function (exports) {
|
|
|
5223
5260
|
ContentContainer.contextType = RenderId;
|
|
5224
5261
|
function InnerContentInjector(containerComponent, props) {
|
|
5225
5262
|
const parentProps = containerComponent.props;
|
|
5226
|
-
return h((ContentInjector), Object.assign({ renderProps: parentProps.renderProps, generatorName: parentProps.generatorName,
|
|
5263
|
+
return h((ContentInjector), Object.assign({ renderProps: parentProps.renderProps, generatorName: parentProps.generatorName, customGenerator: parentProps.customGenerator, defaultGenerator: parentProps.defaultGenerator, renderId: containerComponent.context }, props));
|
|
5227
5264
|
}
|
|
5228
5265
|
// Utils
|
|
5229
5266
|
function generateClassNames(classNameGenerator, renderProps) {
|
|
@@ -5247,7 +5284,7 @@ var FullCalendar = (function (exports) {
|
|
|
5247
5284
|
? buildNavLinkAttrs(this.context, date)
|
|
5248
5285
|
: {};
|
|
5249
5286
|
let renderProps = Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: viewApi }, props.extraRenderProps), { text }), dayMeta);
|
|
5250
|
-
return (h(ContentContainer, { elTag: "th", elClasses: classNames, elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan, 'data-date': !dayMeta.isDisabled ? formatDayString(date) : undefined }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent",
|
|
5287
|
+
return (h(ContentContainer, { elTag: "th", elClasses: classNames, elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan, 'data-date': !dayMeta.isDisabled ? formatDayString(date) : undefined }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent", customGenerator: options.dayHeaderContent, defaultGenerator: renderInner$1, classNameGenerator: options.dayHeaderClassNames, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, (InnerContainer) => (h("div", { className: "fc-scrollgrid-sync-inner" }, !dayMeta.isDisabled && (h(InnerContainer, { elTag: "a", elAttrs: navLinkAttrs, elClasses: [
|
|
5251
5288
|
'fc-col-header-cell-cushion',
|
|
5252
5289
|
props.isSticky && 'fc-sticky',
|
|
5253
5290
|
] }))))));
|
|
@@ -5275,7 +5312,7 @@ var FullCalendar = (function (exports) {
|
|
|
5275
5312
|
CLASS_NAME,
|
|
5276
5313
|
...getDayClassNames(dateMeta, theme),
|
|
5277
5314
|
...(props.extraClassNames || []),
|
|
5278
|
-
], elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent",
|
|
5315
|
+
], elAttrs: Object.assign({ role: 'columnheader', colSpan: props.colSpan }, props.extraDataAttrs), renderProps: renderProps, generatorName: "dayHeaderContent", customGenerator: options.dayHeaderContent, defaultGenerator: renderInner$1, classNameGenerator: options.dayHeaderClassNames, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, (InnerContent) => (h("div", { className: "fc-scrollgrid-sync-inner" },
|
|
5279
5316
|
h(InnerContent, { elTag: "a", elClasses: [
|
|
5280
5317
|
'fc-col-header-cell-cushion',
|
|
5281
5318
|
props.isSticky && 'fc-sticky',
|
|
@@ -5508,7 +5545,7 @@ var FullCalendar = (function (exports) {
|
|
|
5508
5545
|
let { eventUiBases } = props;
|
|
5509
5546
|
let eventSegs = this.sliceEventStore(props.eventStore, eventUiBases, dateProfile, nextDayThreshold, ...extraArgs);
|
|
5510
5547
|
return {
|
|
5511
|
-
dateSelectionSegs: this.sliceDateSelection(props.dateSelection, eventUiBases, context, ...extraArgs),
|
|
5548
|
+
dateSelectionSegs: this.sliceDateSelection(props.dateSelection, dateProfile, nextDayThreshold, eventUiBases, context, ...extraArgs),
|
|
5512
5549
|
businessHourSegs: this.sliceBusinessHours(props.businessHours, dateProfile, nextDayThreshold, context, ...extraArgs),
|
|
5513
5550
|
fgEventSegs: eventSegs.fg,
|
|
5514
5551
|
bgEventSegs: eventSegs.bg,
|
|
@@ -5518,9 +5555,9 @@ var FullCalendar = (function (exports) {
|
|
|
5518
5555
|
}; // TODO: give interactionSegs?
|
|
5519
5556
|
}
|
|
5520
5557
|
sliceNowDate(// does not memoize
|
|
5521
|
-
date, context, ...extraArgs) {
|
|
5558
|
+
date, dateProfile, nextDayThreshold, context, ...extraArgs) {
|
|
5522
5559
|
return this._sliceDateSpan({ range: { start: date, end: addMs(date, 1) }, allDay: false }, // add 1 ms, protect against null range
|
|
5523
|
-
{}, context, ...extraArgs);
|
|
5560
|
+
dateProfile, nextDayThreshold, {}, context, ...extraArgs);
|
|
5524
5561
|
}
|
|
5525
5562
|
_sliceBusinessHours(businessHours, dateProfile, nextDayThreshold, context, ...extraArgs) {
|
|
5526
5563
|
if (!businessHours) {
|
|
@@ -5549,16 +5586,22 @@ var FullCalendar = (function (exports) {
|
|
|
5549
5586
|
isEvent: interaction.isEvent,
|
|
5550
5587
|
};
|
|
5551
5588
|
}
|
|
5552
|
-
_sliceDateSpan(dateSpan, eventUiBases, context, ...extraArgs) {
|
|
5589
|
+
_sliceDateSpan(dateSpan, dateProfile, nextDayThreshold, eventUiBases, context, ...extraArgs) {
|
|
5553
5590
|
if (!dateSpan) {
|
|
5554
5591
|
return [];
|
|
5555
5592
|
}
|
|
5556
|
-
let
|
|
5557
|
-
let
|
|
5558
|
-
|
|
5559
|
-
|
|
5593
|
+
let activeRange = computeActiveRange(dateProfile, Boolean(nextDayThreshold));
|
|
5594
|
+
let activeDateSpanRange = intersectRanges(dateSpan.range, activeRange);
|
|
5595
|
+
if (activeDateSpanRange) {
|
|
5596
|
+
dateSpan = Object.assign(Object.assign({}, dateSpan), { range: activeDateSpanRange });
|
|
5597
|
+
let eventRange = fabricateEventRange(dateSpan, eventUiBases, context);
|
|
5598
|
+
let segs = this.sliceRange(dateSpan.range, ...extraArgs);
|
|
5599
|
+
for (let seg of segs) {
|
|
5600
|
+
seg.eventRange = eventRange;
|
|
5601
|
+
}
|
|
5602
|
+
return segs;
|
|
5560
5603
|
}
|
|
5561
|
-
return
|
|
5604
|
+
return [];
|
|
5562
5605
|
}
|
|
5563
5606
|
/*
|
|
5564
5607
|
"complete" seg means it has component and eventRange
|
|
@@ -5611,6 +5654,8 @@ var FullCalendar = (function (exports) {
|
|
|
5611
5654
|
switch (action.type) {
|
|
5612
5655
|
case 'RECEIVE_EVENTS': // raw
|
|
5613
5656
|
return receiveRawEvents(eventStore, eventSources[action.sourceId], action.fetchId, action.fetchRange, action.rawEvents, context);
|
|
5657
|
+
case 'RESET_RAW_EVENTS':
|
|
5658
|
+
return resetRawEvents(eventStore, eventSources[action.sourceId], action.rawEvents, context);
|
|
5614
5659
|
case 'ADD_EVENTS': // already parsed, but not expanded
|
|
5615
5660
|
return addEvent(eventStore, action.eventStore, // new ones
|
|
5616
5661
|
dateProfile ? dateProfile.activeRange : null, context);
|
|
@@ -5651,6 +5696,14 @@ var FullCalendar = (function (exports) {
|
|
|
5651
5696
|
}
|
|
5652
5697
|
return eventStore;
|
|
5653
5698
|
}
|
|
5699
|
+
function resetRawEvents(existingEventStore, eventSource, rawEvents, context) {
|
|
5700
|
+
const { defIdMap, instanceIdMap } = buildPublicIdMaps(existingEventStore);
|
|
5701
|
+
let newEventStore = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context, false, defIdMap, instanceIdMap);
|
|
5702
|
+
if (eventSource.fetchRange) {
|
|
5703
|
+
newEventStore = expandRecurring(newEventStore, eventSource.fetchRange, context);
|
|
5704
|
+
}
|
|
5705
|
+
return newEventStore;
|
|
5706
|
+
}
|
|
5654
5707
|
function transformRawEvents(rawEvents, eventSource, context) {
|
|
5655
5708
|
let calEachTransform = context.options.eventDataTransform;
|
|
5656
5709
|
let sourceEachTransform = eventSource ? eventSource.eventDataTransform : null;
|
|
@@ -5711,6 +5764,27 @@ var FullCalendar = (function (exports) {
|
|
|
5711
5764
|
instances: filterHash(eventStore.instances, (instance) => !removals[instance.instanceId]),
|
|
5712
5765
|
};
|
|
5713
5766
|
}
|
|
5767
|
+
function buildPublicIdMaps(eventStore) {
|
|
5768
|
+
const { defs, instances } = eventStore;
|
|
5769
|
+
const defIdMap = {};
|
|
5770
|
+
const instanceIdMap = {};
|
|
5771
|
+
for (let defId in defs) {
|
|
5772
|
+
const def = defs[defId];
|
|
5773
|
+
const { publicId } = def;
|
|
5774
|
+
if (publicId) {
|
|
5775
|
+
defIdMap[publicId] = defId;
|
|
5776
|
+
}
|
|
5777
|
+
}
|
|
5778
|
+
for (let instanceId in instances) {
|
|
5779
|
+
const instance = instances[instanceId];
|
|
5780
|
+
const def = defs[instance.defId];
|
|
5781
|
+
const { publicId } = def;
|
|
5782
|
+
if (publicId) {
|
|
5783
|
+
instanceIdMap[publicId] = instanceId;
|
|
5784
|
+
}
|
|
5785
|
+
}
|
|
5786
|
+
return { defIdMap, instanceIdMap };
|
|
5787
|
+
}
|
|
5714
5788
|
|
|
5715
5789
|
// high-level segmenting-aware tester functions
|
|
5716
5790
|
// ------------------------------------------------------------------------------------------------------------------------
|
|
@@ -6463,7 +6537,7 @@ var FullCalendar = (function (exports) {
|
|
|
6463
6537
|
...getEventClassNames(renderProps),
|
|
6464
6538
|
...seg.eventRange.ui.classNames,
|
|
6465
6539
|
...(props.elClasses || []),
|
|
6466
|
-
], renderProps: renderProps, generatorName: "eventContent",
|
|
6540
|
+
], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
|
|
6467
6541
|
}
|
|
6468
6542
|
componentDidUpdate(prevProps) {
|
|
6469
6543
|
if (this.el && this.props.seg !== prevProps.seg) {
|
|
@@ -6504,7 +6578,7 @@ var FullCalendar = (function (exports) {
|
|
|
6504
6578
|
date: context.dateEnv.toDate(props.date),
|
|
6505
6579
|
view: context.viewApi,
|
|
6506
6580
|
};
|
|
6507
|
-
return (h(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent",
|
|
6581
|
+
return (h(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
|
|
6508
6582
|
}));
|
|
6509
6583
|
|
|
6510
6584
|
const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
|
|
@@ -6520,15 +6594,17 @@ var FullCalendar = (function (exports) {
|
|
|
6520
6594
|
date: props.date,
|
|
6521
6595
|
dateProfile: props.dateProfile,
|
|
6522
6596
|
todayRange: props.todayRange,
|
|
6597
|
+
isMonthStart: props.isMonthStart || false,
|
|
6523
6598
|
showDayNumber: props.showDayNumber,
|
|
6524
6599
|
extraRenderProps: props.extraRenderProps,
|
|
6525
6600
|
viewApi: context.viewApi,
|
|
6526
6601
|
dateEnv: context.dateEnv,
|
|
6602
|
+
monthStartFormat: options.monthStartFormat,
|
|
6527
6603
|
});
|
|
6528
6604
|
return (h(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
|
|
6529
6605
|
...getDayClassNames(renderProps, context.theme),
|
|
6530
6606
|
...(props.elClasses || []),
|
|
6531
|
-
], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent",
|
|
6607
|
+
], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
|
|
6532
6608
|
// don't use custom classNames if disabled
|
|
6533
6609
|
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
|
|
6534
6610
|
}
|
|
@@ -6537,9 +6613,11 @@ var FullCalendar = (function (exports) {
|
|
|
6537
6613
|
return Boolean(options.dayCellContent || hasCustomRenderingHandler('dayCellContent', options));
|
|
6538
6614
|
}
|
|
6539
6615
|
function refineRenderProps(raw) {
|
|
6540
|
-
let { date, dateEnv } = raw;
|
|
6541
|
-
let dayMeta = getDateMeta(date, raw.todayRange, null,
|
|
6542
|
-
|
|
6616
|
+
let { date, dateEnv, dateProfile, isMonthStart } = raw;
|
|
6617
|
+
let dayMeta = getDateMeta(date, raw.todayRange, null, dateProfile);
|
|
6618
|
+
let dayNumberText = raw.showDayNumber ? (dateEnv.format(date, isMonthStart ? raw.monthStartFormat : DAY_NUM_FORMAT)) : '';
|
|
6619
|
+
return Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { isMonthStart,
|
|
6620
|
+
dayNumberText }), raw.extraRenderProps);
|
|
6543
6621
|
}
|
|
6544
6622
|
|
|
6545
6623
|
class BgEvent extends BaseComponent {
|
|
@@ -6565,7 +6643,7 @@ var FullCalendar = (function (exports) {
|
|
|
6565
6643
|
let text = dateEnv.format(date, format);
|
|
6566
6644
|
let renderProps = { num, text, date };
|
|
6567
6645
|
return (h(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
|
|
6568
|
-
, Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent",
|
|
6646
|
+
, Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount })));
|
|
6569
6647
|
}));
|
|
6570
6648
|
function renderInner(innerProps) {
|
|
6571
6649
|
return innerProps.text;
|
|
@@ -6769,7 +6847,7 @@ var FullCalendar = (function (exports) {
|
|
|
6769
6847
|
Boolean(props.moreCnt) && (h(ContentContainer, { elTag: props.elTag || 'a', elRef: this.handleLinkEl, elClasses: [
|
|
6770
6848
|
...(props.elClasses || []),
|
|
6771
6849
|
'fc-more-link',
|
|
6772
|
-
], elStyle: props.elStyle, elAttrs: Object.assign(Object.assign(Object.assign({}, props.elAttrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent",
|
|
6850
|
+
], elStyle: props.elStyle, elAttrs: Object.assign(Object.assign(Object.assign({}, props.elAttrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent", customGenerator: options.moreLinkContent, defaultGenerator: props.defaultGenerator || renderMoreLinkInner, classNameGenerator: options.moreLinkClassNames, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, props.children)),
|
|
6773
6851
|
state.isPopoverOpen && (h(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: this.parentEl, alignmentEl: props.alignmentElRef ?
|
|
6774
6852
|
props.alignmentElRef.current :
|
|
6775
6853
|
this.linkEl, alignGridTop: props.alignGridTop, onClose: this.handlePopoverClose }, props.popoverContent()))));
|
|
@@ -6816,7 +6894,7 @@ var FullCalendar = (function (exports) {
|
|
|
6816
6894
|
return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1;
|
|
6817
6895
|
}
|
|
6818
6896
|
|
|
6819
|
-
class ViewContainer
|
|
6897
|
+
class ViewContainer extends BaseComponent {
|
|
6820
6898
|
render() {
|
|
6821
6899
|
let { props, context } = this;
|
|
6822
6900
|
let { options } = context;
|
|
@@ -6824,7 +6902,7 @@ var FullCalendar = (function (exports) {
|
|
|
6824
6902
|
return (h(ContentContainer, Object.assign({}, props, { elTag: props.elTag || 'div', elClasses: [
|
|
6825
6903
|
...buildViewClassNames(props.viewSpec),
|
|
6826
6904
|
...(props.elClasses || []),
|
|
6827
|
-
], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined,
|
|
6905
|
+
], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }), () => props.children));
|
|
6828
6906
|
}
|
|
6829
6907
|
}
|
|
6830
6908
|
function buildViewClassNames(viewSpec) {
|
|
@@ -6834,20 +6912,60 @@ var FullCalendar = (function (exports) {
|
|
|
6834
6912
|
];
|
|
6835
6913
|
}
|
|
6836
6914
|
|
|
6915
|
+
const injectedStyleEls = [];
|
|
6916
|
+
const rootHasStyles = new WeakMap();
|
|
6917
|
+
if (typeof document !== 'undefined') {
|
|
6918
|
+
rootHasStyles.set(document, true);
|
|
6919
|
+
}
|
|
6920
|
+
/*
|
|
6921
|
+
Called from top-level core/plugin code
|
|
6922
|
+
*/
|
|
6837
6923
|
function injectStyles(css) {
|
|
6838
|
-
if (
|
|
6839
|
-
|
|
6924
|
+
if (css && typeof document !== 'undefined') {
|
|
6925
|
+
injectedStyleEls.push(injectStylesInParent(document.head, css));
|
|
6840
6926
|
}
|
|
6841
|
-
|
|
6927
|
+
}
|
|
6928
|
+
/*
|
|
6929
|
+
Called during calendar initialization
|
|
6930
|
+
*/
|
|
6931
|
+
function ensureElHasStyles(calendarEl) {
|
|
6932
|
+
const root = calendarEl.getRootNode();
|
|
6933
|
+
if (!rootHasStyles.get(root)) {
|
|
6934
|
+
rootHasStyles.set(root, true);
|
|
6935
|
+
for (const injectedStyleEl of injectedStyleEls) {
|
|
6936
|
+
injectStylesInParent(root, injectedStyleEl.innerText);
|
|
6937
|
+
}
|
|
6938
|
+
}
|
|
6939
|
+
}
|
|
6940
|
+
function injectStylesInParent(parentEl, css) {
|
|
6842
6941
|
const style = document.createElement('style');
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
style.styleSheet.cssText = css;
|
|
6942
|
+
const nonce = getNonceValue();
|
|
6943
|
+
if (nonce) {
|
|
6944
|
+
style.nonce = nonce;
|
|
6847
6945
|
}
|
|
6848
|
-
|
|
6849
|
-
|
|
6946
|
+
style.innerText = css;
|
|
6947
|
+
parentEl.appendChild(style);
|
|
6948
|
+
return style;
|
|
6949
|
+
}
|
|
6950
|
+
// nonce
|
|
6951
|
+
// -------------------------------------------------------------------------------------------------
|
|
6952
|
+
let queriedNonceValue;
|
|
6953
|
+
function getNonceValue() {
|
|
6954
|
+
if (queriedNonceValue === undefined) {
|
|
6955
|
+
queriedNonceValue = queryNonceValue();
|
|
6956
|
+
}
|
|
6957
|
+
return queriedNonceValue;
|
|
6958
|
+
}
|
|
6959
|
+
function queryNonceValue() {
|
|
6960
|
+
const metaWithNonce = document.querySelector('meta[name="csp-nonce"]');
|
|
6961
|
+
if (metaWithNonce && metaWithNonce.hasAttribute('content')) {
|
|
6962
|
+
return metaWithNonce.getAttribute('content');
|
|
6963
|
+
}
|
|
6964
|
+
const elWithNonce = document.querySelector('script[nonce]');
|
|
6965
|
+
if (elWithNonce) {
|
|
6966
|
+
return elWithNonce.nonce || '';
|
|
6850
6967
|
}
|
|
6968
|
+
return '';
|
|
6851
6969
|
}
|
|
6852
6970
|
|
|
6853
6971
|
const EVENT_SOURCE_REFINERS = {
|
|
@@ -7379,7 +7497,6 @@ var FullCalendar = (function (exports) {
|
|
|
7379
7497
|
applyStyle: applyStyle,
|
|
7380
7498
|
elementMatches: elementMatches,
|
|
7381
7499
|
elementClosest: elementClosest,
|
|
7382
|
-
getElRoot: getElRoot,
|
|
7383
7500
|
getEventTargetViaRoot: getEventTargetViaRoot,
|
|
7384
7501
|
getUniqueDomId: getUniqueDomId,
|
|
7385
7502
|
parseClassNames: parseClassNames,
|
|
@@ -7441,6 +7558,7 @@ var FullCalendar = (function (exports) {
|
|
|
7441
7558
|
formatIsoTimeString: formatIsoTimeString,
|
|
7442
7559
|
formatDayString: formatDayString,
|
|
7443
7560
|
buildIsoString: buildIsoString,
|
|
7561
|
+
formatIsoMonthStr: formatIsoMonthStr,
|
|
7444
7562
|
NamedTimeZoneImpl: NamedTimeZoneImpl,
|
|
7445
7563
|
parseMarker: parse,
|
|
7446
7564
|
SegHierarchy: SegHierarchy,
|
|
@@ -7509,7 +7627,7 @@ var FullCalendar = (function (exports) {
|
|
|
7509
7627
|
WeekNumberContainer: WeekNumberContainer,
|
|
7510
7628
|
MoreLinkContainer: MoreLinkContainer,
|
|
7511
7629
|
computeEarliestSegStart: computeEarliestSegStart,
|
|
7512
|
-
ViewContainer: ViewContainer
|
|
7630
|
+
ViewContainer: ViewContainer,
|
|
7513
7631
|
triggerDateSelect: triggerDateSelect,
|
|
7514
7632
|
getDefaultEventEnd: getDefaultEventEnd,
|
|
7515
7633
|
injectStyles: injectStyles,
|
|
@@ -7873,7 +7991,7 @@ var FullCalendar = (function (exports) {
|
|
|
7873
7991
|
};
|
|
7874
7992
|
}
|
|
7875
7993
|
function createViewHookComponent(options) {
|
|
7876
|
-
return (viewProps) => (h(ViewContextType.Consumer, null, (context) => (h(ContentContainer, { elTag: "div", elClasses: buildViewClassNames(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined,
|
|
7994
|
+
return (viewProps) => (h(ViewContextType.Consumer, null, (context) => (h(ContentContainer, { elTag: "div", elClasses: buildViewClassNames(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount }))));
|
|
7877
7995
|
}
|
|
7878
7996
|
|
|
7879
7997
|
function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
|
|
@@ -8549,6 +8667,16 @@ var FullCalendar = (function (exports) {
|
|
|
8549
8667
|
*/
|
|
8550
8668
|
function handleEventSources(inputs, context) {
|
|
8551
8669
|
let unfoundSources = hashValuesToArray(context.getCurrentData().eventSources);
|
|
8670
|
+
if (unfoundSources.length === 1 &&
|
|
8671
|
+
inputs.length === 1 &&
|
|
8672
|
+
Array.isArray(unfoundSources[0]._raw) &&
|
|
8673
|
+
Array.isArray(inputs[0])) {
|
|
8674
|
+
context.dispatch({
|
|
8675
|
+
type: 'RESET_RAW_EVENTS',
|
|
8676
|
+
sourceId: unfoundSources[0].sourceId,
|
|
8677
|
+
rawEvents: inputs[0],
|
|
8678
|
+
});
|
|
8679
|
+
}
|
|
8552
8680
|
let newInputs = [];
|
|
8553
8681
|
for (let input of inputs) {
|
|
8554
8682
|
let inputFound = false;
|
|
@@ -8686,7 +8814,6 @@ var FullCalendar = (function (exports) {
|
|
|
8686
8814
|
// also, whatever is happening in constructor, have it happen in action queue too
|
|
8687
8815
|
class CalendarDataManager {
|
|
8688
8816
|
constructor(props) {
|
|
8689
|
-
this.computeOptionsData = memoize(this._computeOptionsData);
|
|
8690
8817
|
this.computeCurrentViewData = memoize(this._computeCurrentViewData);
|
|
8691
8818
|
this.organizeRawLocales = memoize(organizeRawLocales);
|
|
8692
8819
|
this.buildLocale = memoize(buildLocale);
|
|
@@ -8709,6 +8836,8 @@ var FullCalendar = (function (exports) {
|
|
|
8709
8836
|
this.currentViewOptionsInput = {};
|
|
8710
8837
|
this.currentViewOptionsRefined = {};
|
|
8711
8838
|
this.currentCalendarOptionsRefiners = {};
|
|
8839
|
+
this.optionsForRefining = [];
|
|
8840
|
+
this.optionsForHandling = [];
|
|
8712
8841
|
this.getCurrentData = () => this.data;
|
|
8713
8842
|
this.dispatch = (action) => {
|
|
8714
8843
|
this.actionRunner.request(action); // protects against recursive calls to _handleAction
|
|
@@ -8771,13 +8900,20 @@ var FullCalendar = (function (exports) {
|
|
|
8771
8900
|
this.updateData();
|
|
8772
8901
|
this.actionRunner.resume();
|
|
8773
8902
|
}
|
|
8774
|
-
resetOptions(optionOverrides,
|
|
8903
|
+
resetOptions(optionOverrides, changedOptionNames) {
|
|
8775
8904
|
let { props } = this;
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8905
|
+
if (changedOptionNames === undefined) {
|
|
8906
|
+
props.optionOverrides = optionOverrides;
|
|
8907
|
+
}
|
|
8908
|
+
else {
|
|
8909
|
+
props.optionOverrides = Object.assign(Object.assign({}, (props.optionOverrides || {})), optionOverrides);
|
|
8910
|
+
this.optionsForRefining.push(...changedOptionNames);
|
|
8911
|
+
}
|
|
8912
|
+
if (changedOptionNames === undefined || changedOptionNames.length) {
|
|
8913
|
+
this.actionRunner.request({
|
|
8914
|
+
type: 'NOTHING',
|
|
8915
|
+
});
|
|
8916
|
+
}
|
|
8781
8917
|
}
|
|
8782
8918
|
_handleAction(action) {
|
|
8783
8919
|
let { props, state, emitter } = this;
|
|
@@ -8869,24 +9005,31 @@ var FullCalendar = (function (exports) {
|
|
|
8869
9005
|
state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv);
|
|
8870
9006
|
}
|
|
8871
9007
|
for (let optionName in changeHandlers) {
|
|
8872
|
-
if (
|
|
9008
|
+
if (this.optionsForHandling.indexOf(optionName) !== -1 ||
|
|
9009
|
+
oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) {
|
|
8873
9010
|
changeHandlers[optionName](newCalendarOptions[optionName], data);
|
|
8874
9011
|
}
|
|
8875
9012
|
}
|
|
8876
9013
|
}
|
|
9014
|
+
this.optionsForHandling = [];
|
|
8877
9015
|
if (props.onData) {
|
|
8878
9016
|
props.onData(data);
|
|
8879
9017
|
}
|
|
8880
9018
|
}
|
|
8881
|
-
|
|
9019
|
+
computeOptionsData(optionOverrides, dynamicOptionOverrides, calendarApi) {
|
|
8882
9020
|
// TODO: blacklist options that are handled by optionChangeHandlers
|
|
9021
|
+
if (!this.optionsForRefining.length &&
|
|
9022
|
+
optionOverrides === this.stableOptionOverrides &&
|
|
9023
|
+
dynamicOptionOverrides === this.stableDynamicOptionOverrides) {
|
|
9024
|
+
return this.stableCalendarOptionsData;
|
|
9025
|
+
}
|
|
8883
9026
|
let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData, extra, } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides);
|
|
8884
9027
|
warnUnknownOptions(extra);
|
|
8885
9028
|
let dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator);
|
|
8886
|
-
let viewSpecs = this.buildViewSpecs(pluginHooks.views,
|
|
9029
|
+
let viewSpecs = this.buildViewSpecs(pluginHooks.views, this.stableOptionOverrides, this.stableDynamicOptionOverrides, localeDefaults);
|
|
8887
9030
|
let theme = this.buildTheme(refinedOptions, pluginHooks);
|
|
8888
|
-
let toolbarConfig = this.parseToolbars(refinedOptions,
|
|
8889
|
-
return {
|
|
9031
|
+
let toolbarConfig = this.parseToolbars(refinedOptions, this.stableOptionOverrides, theme, viewSpecs, calendarApi);
|
|
9032
|
+
return this.stableCalendarOptionsData = {
|
|
8890
9033
|
calendarOptions: refinedOptions,
|
|
8891
9034
|
pluginHooks,
|
|
8892
9035
|
dateEnv,
|
|
@@ -8921,26 +9064,27 @@ var FullCalendar = (function (exports) {
|
|
|
8921
9064
|
let currentRefined = this.currentCalendarOptionsRefined;
|
|
8922
9065
|
let anyChanges = false;
|
|
8923
9066
|
for (let optionName in raw) {
|
|
8924
|
-
if (optionName
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
else {
|
|
8936
|
-
extra[optionName] = currentRaw[optionName];
|
|
8937
|
-
}
|
|
9067
|
+
if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
9068
|
+
(optionName in currentRaw) &&
|
|
9069
|
+
COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])))) {
|
|
9070
|
+
refined[optionName] = currentRefined[optionName];
|
|
9071
|
+
}
|
|
9072
|
+
else if (refiners[optionName]) {
|
|
9073
|
+
refined[optionName] = refiners[optionName](raw[optionName]);
|
|
9074
|
+
anyChanges = true;
|
|
9075
|
+
}
|
|
9076
|
+
else {
|
|
9077
|
+
extra[optionName] = currentRaw[optionName];
|
|
8938
9078
|
}
|
|
8939
9079
|
}
|
|
8940
9080
|
if (anyChanges) {
|
|
8941
9081
|
this.currentCalendarOptionsInput = raw;
|
|
8942
9082
|
this.currentCalendarOptionsRefined = refined;
|
|
9083
|
+
this.stableOptionOverrides = optionOverrides;
|
|
9084
|
+
this.stableDynamicOptionOverrides = dynamicOptionOverrides;
|
|
8943
9085
|
}
|
|
9086
|
+
this.optionsForHandling.push(...this.optionsForRefining);
|
|
9087
|
+
this.optionsForRefining = [];
|
|
8944
9088
|
return {
|
|
8945
9089
|
rawOptions: this.currentCalendarOptionsInput,
|
|
8946
9090
|
refinedOptions: this.currentCalendarOptionsRefined,
|
|
@@ -8975,7 +9119,6 @@ var FullCalendar = (function (exports) {
|
|
|
8975
9119
|
nowInput: refinedOptions.now,
|
|
8976
9120
|
validRangeInput: refinedOptions.validRange,
|
|
8977
9121
|
visibleRangeInput: refinedOptions.visibleRange,
|
|
8978
|
-
monthMode: refinedOptions.monthMode,
|
|
8979
9122
|
fixedWeekCount: refinedOptions.fixedWeekCount,
|
|
8980
9123
|
});
|
|
8981
9124
|
let viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv);
|
|
@@ -9184,8 +9327,7 @@ var FullCalendar = (function (exports) {
|
|
|
9184
9327
|
}
|
|
9185
9328
|
}
|
|
9186
9329
|
|
|
9187
|
-
|
|
9188
|
-
class ViewContainer extends BaseComponent {
|
|
9330
|
+
class ViewHarness extends BaseComponent {
|
|
9189
9331
|
constructor() {
|
|
9190
9332
|
super(...arguments);
|
|
9191
9333
|
this.state = {
|
|
@@ -9401,7 +9543,7 @@ var FullCalendar = (function (exports) {
|
|
|
9401
9543
|
: '';
|
|
9402
9544
|
return (h(ViewContextType.Provider, { value: viewContext },
|
|
9403
9545
|
toolbarConfig.header && (h(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
|
|
9404
|
-
h(
|
|
9546
|
+
h(ViewHarness, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
|
|
9405
9547
|
this.renderView(props),
|
|
9406
9548
|
this.buildAppendContent()),
|
|
9407
9549
|
toolbarConfig.footer && (h(Toolbar, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
|
|
@@ -9520,6 +9662,7 @@ var FullCalendar = (function (exports) {
|
|
|
9520
9662
|
this.setHeight('');
|
|
9521
9663
|
}
|
|
9522
9664
|
};
|
|
9665
|
+
ensureElHasStyles(el);
|
|
9523
9666
|
this.el = el;
|
|
9524
9667
|
this.renderRunner = new DelayedRunner(this.handleRenderRequest);
|
|
9525
9668
|
new CalendarDataManager({
|
|
@@ -9564,8 +9707,8 @@ var FullCalendar = (function (exports) {
|
|
|
9564
9707
|
resumeRendering() {
|
|
9565
9708
|
this.renderRunner.resume('pauseRendering', true);
|
|
9566
9709
|
}
|
|
9567
|
-
resetOptions(optionOverrides,
|
|
9568
|
-
this.currentDataManager.resetOptions(optionOverrides,
|
|
9710
|
+
resetOptions(optionOverrides, changedOptionNames) {
|
|
9711
|
+
this.currentDataManager.resetOptions(optionOverrides, changedOptionNames);
|
|
9569
9712
|
}
|
|
9570
9713
|
setClassNames(classNames) {
|
|
9571
9714
|
if (!isArraysEqual(classNames, this.currentClassNames)) {
|
|
@@ -9625,7 +9768,7 @@ var FullCalendar = (function (exports) {
|
|
|
9625
9768
|
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
9626
9769
|
}
|
|
9627
9770
|
|
|
9628
|
-
const version = '6.
|
|
9771
|
+
const version = '6.1.1';
|
|
9629
9772
|
|
|
9630
9773
|
exports.Calendar = Calendar;
|
|
9631
9774
|
exports.Internal = internal;
|