@fullcalendar/core 6.0.0 → 6.0.2
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.cjs +587 -9
- package/index.d.ts +7 -3
- package/index.global.js +786 -771
- package/index.global.min.js +2 -2
- package/index.js +580 -4
- package/index.js.map +1 -0
- package/internal-common.cjs +23 -586
- package/internal-common.d.ts +4 -5
- package/internal-common.js +18 -579
- package/internal-common.js.map +1 -0
- package/internal.cjs +0 -2
- package/internal.d.ts +1 -1
- package/internal.js +1 -1
- package/internal.js.map +1 -0
- package/locales/af.global.js +4 -4
- package/locales/af.global.min.js +2 -2
- package/locales/af.js.map +1 -0
- package/locales/ar-dz.global.js +4 -4
- package/locales/ar-dz.global.min.js +2 -2
- package/locales/ar-dz.js.map +1 -0
- package/locales/ar-kw.global.js +4 -4
- package/locales/ar-kw.global.min.js +2 -2
- package/locales/ar-kw.js.map +1 -0
- package/locales/ar-ly.global.js +4 -4
- package/locales/ar-ly.global.min.js +2 -2
- package/locales/ar-ly.js.map +1 -0
- package/locales/ar-ma.global.js +4 -4
- package/locales/ar-ma.global.min.js +2 -2
- package/locales/ar-ma.js.map +1 -0
- package/locales/ar-sa.global.js +4 -4
- package/locales/ar-sa.global.min.js +2 -2
- package/locales/ar-sa.js.map +1 -0
- package/locales/ar-tn.global.js +4 -4
- package/locales/ar-tn.global.min.js +2 -2
- package/locales/ar-tn.js.map +1 -0
- package/locales/ar.global.js +4 -4
- package/locales/ar.global.min.js +2 -2
- package/locales/ar.js.map +1 -0
- package/locales/az.global.js +4 -4
- package/locales/az.global.min.js +2 -2
- package/locales/az.js.map +1 -0
- package/locales/bg.global.js +4 -4
- package/locales/bg.global.min.js +2 -2
- package/locales/bg.js.map +1 -0
- package/locales/bn.global.js +4 -4
- package/locales/bn.global.min.js +2 -2
- package/locales/bn.js.map +1 -0
- package/locales/bs.global.js +4 -4
- package/locales/bs.global.min.js +2 -2
- package/locales/bs.js.map +1 -0
- package/locales/ca.global.js +4 -4
- package/locales/ca.global.min.js +2 -2
- package/locales/ca.js.map +1 -0
- package/locales/cs.global.js +4 -4
- package/locales/cs.global.min.js +2 -2
- package/locales/cs.js.map +1 -0
- package/locales/cy.global.js +4 -4
- package/locales/cy.global.min.js +2 -2
- package/locales/cy.js.map +1 -0
- package/locales/da.global.js +4 -4
- package/locales/da.global.min.js +2 -2
- package/locales/da.js.map +1 -0
- package/locales/de-at.global.js +4 -4
- package/locales/de-at.global.min.js +2 -2
- package/locales/de-at.js.map +1 -0
- package/locales/de.global.js +4 -4
- package/locales/de.global.min.js +2 -2
- package/locales/de.js.map +1 -0
- package/locales/el.global.js +4 -4
- package/locales/el.global.min.js +2 -2
- package/locales/el.js.map +1 -0
- package/locales/en-au.global.js +4 -4
- package/locales/en-au.global.min.js +2 -2
- package/locales/en-au.js.map +1 -0
- package/locales/en-gb.global.js +4 -4
- package/locales/en-gb.global.min.js +2 -2
- package/locales/en-gb.js.map +1 -0
- package/locales/en-nz.global.js +4 -4
- package/locales/en-nz.global.min.js +2 -2
- package/locales/en-nz.js.map +1 -0
- package/locales/eo.global.js +4 -4
- package/locales/eo.global.min.js +2 -2
- package/locales/eo.js.map +1 -0
- package/locales/es-us.global.js +4 -4
- package/locales/es-us.global.min.js +2 -2
- package/locales/es-us.js.map +1 -0
- package/locales/es.global.js +4 -4
- package/locales/es.global.min.js +2 -2
- package/locales/es.js.map +1 -0
- package/locales/et.global.js +4 -4
- package/locales/et.global.min.js +2 -2
- package/locales/et.js.map +1 -0
- package/locales/eu.global.js +4 -4
- package/locales/eu.global.min.js +2 -2
- package/locales/eu.js.map +1 -0
- package/locales/fa.global.js +4 -4
- package/locales/fa.global.min.js +2 -2
- package/locales/fa.js.map +1 -0
- package/locales/fi.global.js +4 -4
- package/locales/fi.global.min.js +2 -2
- package/locales/fi.js.map +1 -0
- package/locales/fr-ca.global.js +4 -4
- package/locales/fr-ca.global.min.js +2 -2
- package/locales/fr-ca.js.map +1 -0
- package/locales/fr-ch.global.js +4 -4
- package/locales/fr-ch.global.min.js +2 -2
- package/locales/fr-ch.js.map +1 -0
- package/locales/fr.global.js +4 -4
- package/locales/fr.global.min.js +2 -2
- package/locales/fr.js.map +1 -0
- package/locales/gl.global.js +4 -4
- package/locales/gl.global.min.js +2 -2
- package/locales/gl.js.map +1 -0
- package/locales/he.global.js +4 -4
- package/locales/he.global.min.js +2 -2
- package/locales/he.js.map +1 -0
- package/locales/hi.global.js +4 -4
- package/locales/hi.global.min.js +2 -2
- package/locales/hi.js.map +1 -0
- package/locales/hr.global.js +4 -4
- package/locales/hr.global.min.js +2 -2
- package/locales/hr.js.map +1 -0
- package/locales/hu.global.js +4 -4
- package/locales/hu.global.min.js +2 -2
- package/locales/hu.js.map +1 -0
- package/locales/hy-am.global.js +4 -4
- package/locales/hy-am.global.min.js +2 -2
- package/locales/hy-am.js.map +1 -0
- package/locales/id.global.js +4 -4
- package/locales/id.global.min.js +2 -2
- package/locales/id.js.map +1 -0
- package/locales/is.global.js +4 -4
- package/locales/is.global.min.js +2 -2
- package/locales/is.js.map +1 -0
- package/locales/it.global.js +4 -4
- package/locales/it.global.min.js +2 -2
- package/locales/it.js.map +1 -0
- package/locales/ja.global.js +4 -4
- package/locales/ja.global.min.js +2 -2
- package/locales/ja.js.map +1 -0
- package/locales/ka.global.js +4 -4
- package/locales/ka.global.min.js +2 -2
- package/locales/ka.js.map +1 -0
- package/locales/kk.global.js +4 -4
- package/locales/kk.global.min.js +2 -2
- package/locales/kk.js.map +1 -0
- package/locales/km.global.js +4 -4
- package/locales/km.global.min.js +2 -2
- package/locales/km.js.map +1 -0
- package/locales/ko.global.js +4 -4
- package/locales/ko.global.min.js +2 -2
- package/locales/ko.js.map +1 -0
- package/locales/ku.global.js +4 -4
- package/locales/ku.global.min.js +2 -2
- package/locales/ku.js.map +1 -0
- package/locales/lb.global.js +4 -4
- package/locales/lb.global.min.js +2 -2
- package/locales/lb.js.map +1 -0
- package/locales/lt.global.js +4 -4
- package/locales/lt.global.min.js +2 -2
- package/locales/lt.js.map +1 -0
- package/locales/lv.global.js +4 -4
- package/locales/lv.global.min.js +2 -2
- package/locales/lv.js.map +1 -0
- package/locales/mk.global.js +4 -4
- package/locales/mk.global.min.js +2 -2
- package/locales/mk.js.map +1 -0
- package/locales/ms.global.js +4 -4
- package/locales/ms.global.min.js +2 -2
- package/locales/ms.js.map +1 -0
- package/locales/nb.global.js +4 -4
- package/locales/nb.global.min.js +2 -2
- package/locales/nb.js.map +1 -0
- package/locales/ne.global.js +4 -4
- package/locales/ne.global.min.js +2 -2
- package/locales/ne.js.map +1 -0
- package/locales/nl.global.js +4 -4
- package/locales/nl.global.min.js +2 -2
- package/locales/nl.js.map +1 -0
- package/locales/nn.global.js +4 -4
- package/locales/nn.global.min.js +2 -2
- package/locales/nn.js.map +1 -0
- package/locales/pl.global.js +4 -4
- package/locales/pl.global.min.js +2 -2
- package/locales/pl.js.map +1 -0
- package/locales/pt-br.global.js +4 -4
- package/locales/pt-br.global.min.js +2 -2
- package/locales/pt-br.js.map +1 -0
- package/locales/pt.global.js +4 -4
- package/locales/pt.global.min.js +2 -2
- package/locales/pt.js.map +1 -0
- package/locales/ro.global.js +4 -4
- package/locales/ro.global.min.js +2 -2
- package/locales/ro.js.map +1 -0
- package/locales/ru.global.js +4 -4
- package/locales/ru.global.min.js +2 -2
- package/locales/ru.js.map +1 -0
- package/locales/si-lk.global.js +4 -4
- package/locales/si-lk.global.min.js +2 -2
- package/locales/si-lk.js.map +1 -0
- package/locales/sk.global.js +4 -4
- package/locales/sk.global.min.js +2 -2
- package/locales/sk.js.map +1 -0
- package/locales/sl.global.js +4 -4
- package/locales/sl.global.min.js +2 -2
- package/locales/sl.js.map +1 -0
- package/locales/sm.global.js +4 -4
- package/locales/sm.global.min.js +2 -2
- package/locales/sm.js.map +1 -0
- package/locales/sq.global.js +4 -4
- package/locales/sq.global.min.js +2 -2
- package/locales/sq.js.map +1 -0
- package/locales/sr-cyrl.global.js +4 -4
- package/locales/sr-cyrl.global.min.js +2 -2
- package/locales/sr-cyrl.js.map +1 -0
- package/locales/sr.global.js +4 -4
- package/locales/sr.global.min.js +2 -2
- package/locales/sr.js.map +1 -0
- package/locales/sv.global.js +4 -4
- package/locales/sv.global.min.js +2 -2
- package/locales/sv.js.map +1 -0
- package/locales/ta-in.global.js +4 -4
- package/locales/ta-in.global.min.js +2 -2
- package/locales/ta-in.js.map +1 -0
- package/locales/th.global.js +4 -4
- package/locales/th.global.min.js +2 -2
- package/locales/th.js.map +1 -0
- package/locales/tr.global.js +4 -4
- package/locales/tr.global.min.js +2 -2
- package/locales/tr.js.map +1 -0
- package/locales/ug.global.js +4 -4
- package/locales/ug.global.min.js +2 -2
- package/locales/ug.js.map +1 -0
- package/locales/uk.global.js +4 -4
- package/locales/uk.global.min.js +2 -2
- package/locales/uk.js.map +1 -0
- package/locales/uz.global.js +4 -4
- package/locales/uz.global.min.js +2 -2
- package/locales/uz.js.map +1 -0
- package/locales/vi.global.js +4 -4
- package/locales/vi.global.min.js +2 -2
- package/locales/vi.js.map +1 -0
- package/locales/zh-cn.global.js +4 -4
- package/locales/zh-cn.global.min.js +2 -2
- package/locales/zh-cn.js.map +1 -0
- package/locales/zh-tw.global.js +4 -4
- package/locales/zh-tw.global.min.js +2 -2
- package/locales/zh-tw.js.map +1 -0
- package/locales-all.global.js +4 -4
- package/locales-all.global.min.js +2 -2
- package/locales-all.js.map +1 -0
- package/package.json +1 -1
- package/preact.js +1 -1
- package/preact.js.map +1 -0
package/index.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar Core v6.0.
|
|
2
|
+
FullCalendar Core v6.0.2
|
|
3
3
|
Docs & License: https://fullcalendar.io
|
|
4
4
|
(c) 2022 Adam Shaw
|
|
5
5
|
*/
|
|
@@ -558,6 +558,16 @@ var FullCalendar = (function (exports) {
|
|
|
558
558
|
}
|
|
559
559
|
return true;
|
|
560
560
|
}
|
|
561
|
+
const HANDLER_RE = /^on[A-Z]/;
|
|
562
|
+
function isNonHandlerPropsEqual(obj0, obj1) {
|
|
563
|
+
const keys = getUnequalProps(obj0, obj1);
|
|
564
|
+
for (let key of keys) {
|
|
565
|
+
if (!HANDLER_RE.test(key)) {
|
|
566
|
+
return false;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
return true;
|
|
570
|
+
}
|
|
561
571
|
function getUnequalProps(obj0, obj1) {
|
|
562
572
|
let keys = [];
|
|
563
573
|
for (let key in obj0) {
|
|
@@ -4972,8 +4982,6 @@ var FullCalendar = (function (exports) {
|
|
|
4972
4982
|
// tho it's really easy to access this globally rather than pass thru options.
|
|
4973
4983
|
const config = {};
|
|
4974
4984
|
|
|
4975
|
-
const globalLocales = [];
|
|
4976
|
-
|
|
4977
4985
|
/*
|
|
4978
4986
|
Information about what will happen when an external element is dragged-and-dropped
|
|
4979
4987
|
onto a calendar. Contains information for creating an event.
|
|
@@ -5136,7 +5144,7 @@ var FullCalendar = (function (exports) {
|
|
|
5136
5144
|
ContentInjector.addPropsEquality({
|
|
5137
5145
|
elClasses: isArraysEqual,
|
|
5138
5146
|
elStyle: isPropsEqual,
|
|
5139
|
-
elAttrs:
|
|
5147
|
+
elAttrs: isNonHandlerPropsEqual,
|
|
5140
5148
|
renderProps: isPropsEqual,
|
|
5141
5149
|
});
|
|
5142
5150
|
// Util
|
|
@@ -6397,744 +6405,114 @@ var FullCalendar = (function (exports) {
|
|
|
6397
6405
|
return null;
|
|
6398
6406
|
}
|
|
6399
6407
|
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
reducers: input.reducers || [],
|
|
6408
|
-
isLoadingFuncs: input.isLoadingFuncs || [],
|
|
6409
|
-
contextInit: [].concat(input.contextInit || []),
|
|
6410
|
-
eventRefiners: input.eventRefiners || {},
|
|
6411
|
-
eventDefMemberAdders: input.eventDefMemberAdders || [],
|
|
6412
|
-
eventSourceRefiners: input.eventSourceRefiners || {},
|
|
6413
|
-
isDraggableTransformers: input.isDraggableTransformers || [],
|
|
6414
|
-
eventDragMutationMassagers: input.eventDragMutationMassagers || [],
|
|
6415
|
-
eventDefMutationAppliers: input.eventDefMutationAppliers || [],
|
|
6416
|
-
dateSelectionTransformers: input.dateSelectionTransformers || [],
|
|
6417
|
-
datePointTransforms: input.datePointTransforms || [],
|
|
6418
|
-
dateSpanTransforms: input.dateSpanTransforms || [],
|
|
6419
|
-
views: input.views || {},
|
|
6420
|
-
viewPropsTransformers: input.viewPropsTransformers || [],
|
|
6421
|
-
isPropsValid: input.isPropsValid || null,
|
|
6422
|
-
externalDefTransforms: input.externalDefTransforms || [],
|
|
6423
|
-
viewContainerAppends: input.viewContainerAppends || [],
|
|
6424
|
-
eventDropTransformers: input.eventDropTransformers || [],
|
|
6425
|
-
componentInteractions: input.componentInteractions || [],
|
|
6426
|
-
calendarInteractions: input.calendarInteractions || [],
|
|
6427
|
-
themeClasses: input.themeClasses || {},
|
|
6428
|
-
eventSourceDefs: input.eventSourceDefs || [],
|
|
6429
|
-
cmdFormatter: input.cmdFormatter,
|
|
6430
|
-
recurringTypes: input.recurringTypes || [],
|
|
6431
|
-
namedTimeZonedImpl: input.namedTimeZonedImpl,
|
|
6432
|
-
initialView: input.initialView || '',
|
|
6433
|
-
elementDraggingImpl: input.elementDraggingImpl,
|
|
6434
|
-
optionChangeHandlers: input.optionChangeHandlers || {},
|
|
6435
|
-
scrollGridImpl: input.scrollGridImpl || null,
|
|
6436
|
-
listenerRefiners: input.listenerRefiners || {},
|
|
6437
|
-
optionRefiners: input.optionRefiners || {},
|
|
6438
|
-
propSetHandlers: input.propSetHandlers || {},
|
|
6439
|
-
};
|
|
6440
|
-
}
|
|
6441
|
-
function buildPluginHooks(pluginDefs, globalDefs) {
|
|
6442
|
-
let currentPluginIds = {};
|
|
6443
|
-
let hooks = {
|
|
6444
|
-
premiumReleaseDate: undefined,
|
|
6445
|
-
reducers: [],
|
|
6446
|
-
isLoadingFuncs: [],
|
|
6447
|
-
contextInit: [],
|
|
6448
|
-
eventRefiners: {},
|
|
6449
|
-
eventDefMemberAdders: [],
|
|
6450
|
-
eventSourceRefiners: {},
|
|
6451
|
-
isDraggableTransformers: [],
|
|
6452
|
-
eventDragMutationMassagers: [],
|
|
6453
|
-
eventDefMutationAppliers: [],
|
|
6454
|
-
dateSelectionTransformers: [],
|
|
6455
|
-
datePointTransforms: [],
|
|
6456
|
-
dateSpanTransforms: [],
|
|
6457
|
-
views: {},
|
|
6458
|
-
viewPropsTransformers: [],
|
|
6459
|
-
isPropsValid: null,
|
|
6460
|
-
externalDefTransforms: [],
|
|
6461
|
-
viewContainerAppends: [],
|
|
6462
|
-
eventDropTransformers: [],
|
|
6463
|
-
componentInteractions: [],
|
|
6464
|
-
calendarInteractions: [],
|
|
6465
|
-
themeClasses: {},
|
|
6466
|
-
eventSourceDefs: [],
|
|
6467
|
-
cmdFormatter: null,
|
|
6468
|
-
recurringTypes: [],
|
|
6469
|
-
namedTimeZonedImpl: null,
|
|
6470
|
-
initialView: '',
|
|
6471
|
-
elementDraggingImpl: null,
|
|
6472
|
-
optionChangeHandlers: {},
|
|
6473
|
-
scrollGridImpl: null,
|
|
6474
|
-
listenerRefiners: {},
|
|
6475
|
-
optionRefiners: {},
|
|
6476
|
-
propSetHandlers: {},
|
|
6477
|
-
};
|
|
6478
|
-
function addDefs(defs) {
|
|
6479
|
-
for (let def of defs) {
|
|
6480
|
-
const pluginName = def.name;
|
|
6481
|
-
const currentId = currentPluginIds[pluginName];
|
|
6482
|
-
if (currentId === undefined) {
|
|
6483
|
-
currentPluginIds[pluginName] = def.id;
|
|
6484
|
-
addDefs(def.deps);
|
|
6485
|
-
hooks = combineHooks(hooks, def);
|
|
6486
|
-
}
|
|
6487
|
-
else if (currentId !== def.id) {
|
|
6488
|
-
// different ID than the one already added
|
|
6489
|
-
console.warn(`Duplicate plugin '${pluginName}'`);
|
|
6408
|
+
class EventContainer extends BaseComponent {
|
|
6409
|
+
constructor() {
|
|
6410
|
+
super(...arguments);
|
|
6411
|
+
this.handleEl = (el) => {
|
|
6412
|
+
this.el = el;
|
|
6413
|
+
if (el) {
|
|
6414
|
+
setElSeg(el, this.props.seg);
|
|
6490
6415
|
}
|
|
6416
|
+
};
|
|
6417
|
+
}
|
|
6418
|
+
render() {
|
|
6419
|
+
const { props, context } = this;
|
|
6420
|
+
const { options } = context;
|
|
6421
|
+
const { seg } = props;
|
|
6422
|
+
const { eventRange } = seg;
|
|
6423
|
+
const { ui } = eventRange;
|
|
6424
|
+
const renderProps = {
|
|
6425
|
+
event: new EventImpl(context, eventRange.def, eventRange.instance),
|
|
6426
|
+
view: context.viewApi,
|
|
6427
|
+
timeText: props.timeText,
|
|
6428
|
+
textColor: ui.textColor,
|
|
6429
|
+
backgroundColor: ui.backgroundColor,
|
|
6430
|
+
borderColor: ui.borderColor,
|
|
6431
|
+
isDraggable: !props.disableDragging && computeSegDraggable(seg, context),
|
|
6432
|
+
isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),
|
|
6433
|
+
isEndResizable: !props.disableResizing && computeSegEndResizable(seg),
|
|
6434
|
+
isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
|
|
6435
|
+
isStart: Boolean(seg.isStart),
|
|
6436
|
+
isEnd: Boolean(seg.isEnd),
|
|
6437
|
+
isPast: Boolean(props.isPast),
|
|
6438
|
+
isFuture: Boolean(props.isFuture),
|
|
6439
|
+
isToday: Boolean(props.isToday),
|
|
6440
|
+
isSelected: Boolean(props.isSelected),
|
|
6441
|
+
isDragging: Boolean(props.isDragging),
|
|
6442
|
+
isResizing: Boolean(props.isResizing),
|
|
6443
|
+
};
|
|
6444
|
+
return (h(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
|
|
6445
|
+
...getEventClassNames(renderProps),
|
|
6446
|
+
...seg.eventRange.ui.classNames,
|
|
6447
|
+
...(props.elClasses || []),
|
|
6448
|
+
], renderProps: renderProps, generatorName: "eventContent", generator: options.eventContent || props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
|
|
6449
|
+
}
|
|
6450
|
+
componentDidUpdate(prevProps) {
|
|
6451
|
+
if (this.el && this.props.seg !== prevProps.seg) {
|
|
6452
|
+
setElSeg(this.el, this.props.seg);
|
|
6491
6453
|
}
|
|
6492
6454
|
}
|
|
6493
|
-
|
|
6494
|
-
|
|
6455
|
+
}
|
|
6456
|
+
|
|
6457
|
+
// should not be a purecomponent
|
|
6458
|
+
class StandardEvent extends BaseComponent {
|
|
6459
|
+
render() {
|
|
6460
|
+
let { props, context } = this;
|
|
6461
|
+
let { options } = context;
|
|
6462
|
+
let { seg } = props;
|
|
6463
|
+
let { ui } = seg.eventRange;
|
|
6464
|
+
let timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
|
|
6465
|
+
let timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);
|
|
6466
|
+
return (h(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: {
|
|
6467
|
+
borderColor: ui.borderColor,
|
|
6468
|
+
backgroundColor: ui.backgroundColor,
|
|
6469
|
+
}, elAttrs: getSegAnchorAttrs(seg, context), defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (h(p, null,
|
|
6470
|
+
h(InnerContent, { elTag: "div", elClasses: ['fc-event-main'], elStyle: { color: eventContentArg.textColor } }),
|
|
6471
|
+
Boolean(eventContentArg.isStartResizable) && (h("div", { className: "fc-event-resizer fc-event-resizer-start" })),
|
|
6472
|
+
Boolean(eventContentArg.isEndResizable) && (h("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
|
|
6495
6473
|
}
|
|
6496
|
-
addDefs(globalDefs);
|
|
6497
|
-
return hooks;
|
|
6498
6474
|
}
|
|
6499
|
-
function
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) {
|
|
6505
|
-
currentHooks = buildPluginHooks(overrideDefs, globalDefs);
|
|
6506
|
-
}
|
|
6507
|
-
currentOverrideDefs = overrideDefs;
|
|
6508
|
-
currentGlobalDefs = globalDefs;
|
|
6509
|
-
return currentHooks;
|
|
6510
|
-
};
|
|
6475
|
+
function renderInnerContent$1(innerProps) {
|
|
6476
|
+
return (h("div", { className: "fc-event-main-frame" },
|
|
6477
|
+
innerProps.timeText && (h("div", { className: "fc-event-time" }, innerProps.timeText)),
|
|
6478
|
+
h("div", { className: "fc-event-title-container" },
|
|
6479
|
+
h("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || h(p, null, "\u00A0")))));
|
|
6511
6480
|
}
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders),
|
|
6520
|
-
eventSourceRefiners: Object.assign(Object.assign({}, hooks0.eventSourceRefiners), hooks1.eventSourceRefiners),
|
|
6521
|
-
isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),
|
|
6522
|
-
eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),
|
|
6523
|
-
eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),
|
|
6524
|
-
dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),
|
|
6525
|
-
datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),
|
|
6526
|
-
dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),
|
|
6527
|
-
views: Object.assign(Object.assign({}, hooks0.views), hooks1.views),
|
|
6528
|
-
viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),
|
|
6529
|
-
isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,
|
|
6530
|
-
externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),
|
|
6531
|
-
viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends),
|
|
6532
|
-
eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),
|
|
6533
|
-
calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),
|
|
6534
|
-
componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),
|
|
6535
|
-
themeClasses: Object.assign(Object.assign({}, hooks0.themeClasses), hooks1.themeClasses),
|
|
6536
|
-
eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),
|
|
6537
|
-
cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,
|
|
6538
|
-
recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),
|
|
6539
|
-
namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl,
|
|
6540
|
-
initialView: hooks0.initialView || hooks1.initialView,
|
|
6541
|
-
elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,
|
|
6542
|
-
optionChangeHandlers: Object.assign(Object.assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers),
|
|
6543
|
-
scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl,
|
|
6544
|
-
listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
|
|
6545
|
-
optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners),
|
|
6546
|
-
propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
|
|
6481
|
+
|
|
6482
|
+
const NowIndicatorContainer = (props) => (h(ViewContextType.Consumer, null, (context) => {
|
|
6483
|
+
let { options } = context;
|
|
6484
|
+
let renderProps = {
|
|
6485
|
+
isAxis: props.isAxis,
|
|
6486
|
+
date: context.dateEnv.toDate(props.date),
|
|
6487
|
+
view: context.viewApi,
|
|
6547
6488
|
};
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6489
|
+
return (h(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", generator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
|
|
6490
|
+
}));
|
|
6491
|
+
|
|
6492
|
+
const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
|
|
6493
|
+
class DayCellContainer extends BaseComponent {
|
|
6494
|
+
constructor() {
|
|
6495
|
+
super(...arguments);
|
|
6496
|
+
this.refineRenderProps = memoizeObjArg(refineRenderProps);
|
|
6552
6497
|
}
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
}
|
|
6565
|
-
return
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
},
|
|
6572
|
-
};
|
|
6573
|
-
const arrayEventSourcePlugin = createPlugin({
|
|
6574
|
-
name: 'array-event-source',
|
|
6575
|
-
eventSourceDefs: [eventSourceDef$2],
|
|
6576
|
-
});
|
|
6577
|
-
|
|
6578
|
-
let eventSourceDef$1 = {
|
|
6579
|
-
parseMeta(refined) {
|
|
6580
|
-
if (typeof refined.events === 'function') {
|
|
6581
|
-
return refined.events;
|
|
6582
|
-
}
|
|
6583
|
-
return null;
|
|
6584
|
-
},
|
|
6585
|
-
fetch(arg, successCallback, errorCallback) {
|
|
6586
|
-
const { dateEnv } = arg.context;
|
|
6587
|
-
const func = arg.eventSource.meta;
|
|
6588
|
-
unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), (rawEvents) => successCallback({ rawEvents }), errorCallback);
|
|
6589
|
-
},
|
|
6590
|
-
};
|
|
6591
|
-
const funcEventSourcePlugin = createPlugin({
|
|
6592
|
-
name: 'func-event-source',
|
|
6593
|
-
eventSourceDefs: [eventSourceDef$1],
|
|
6594
|
-
});
|
|
6595
|
-
|
|
6596
|
-
const JSON_FEED_EVENT_SOURCE_REFINERS = {
|
|
6597
|
-
method: String,
|
|
6598
|
-
extraParams: identity,
|
|
6599
|
-
startParam: String,
|
|
6600
|
-
endParam: String,
|
|
6601
|
-
timeZoneParam: String,
|
|
6602
|
-
};
|
|
6603
|
-
|
|
6604
|
-
let eventSourceDef = {
|
|
6605
|
-
parseMeta(refined) {
|
|
6606
|
-
if (refined.url && (refined.format === 'json' || !refined.format)) {
|
|
6607
|
-
return {
|
|
6608
|
-
url: refined.url,
|
|
6609
|
-
format: 'json',
|
|
6610
|
-
method: (refined.method || 'GET').toUpperCase(),
|
|
6611
|
-
extraParams: refined.extraParams,
|
|
6612
|
-
startParam: refined.startParam,
|
|
6613
|
-
endParam: refined.endParam,
|
|
6614
|
-
timeZoneParam: refined.timeZoneParam,
|
|
6615
|
-
};
|
|
6616
|
-
}
|
|
6617
|
-
return null;
|
|
6618
|
-
},
|
|
6619
|
-
fetch(arg, successCallback, errorCallback) {
|
|
6620
|
-
const { meta } = arg.eventSource;
|
|
6621
|
-
const requestParams = buildRequestParams(meta, arg.range, arg.context);
|
|
6622
|
-
requestJson(meta.method, meta.url, requestParams).then(([rawEvents, response]) => {
|
|
6623
|
-
successCallback({ rawEvents, response });
|
|
6624
|
-
}, errorCallback);
|
|
6625
|
-
},
|
|
6626
|
-
};
|
|
6627
|
-
const jsonFeedEventSourcePlugin = createPlugin({
|
|
6628
|
-
name: 'json-event-source',
|
|
6629
|
-
eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS,
|
|
6630
|
-
eventSourceDefs: [eventSourceDef],
|
|
6631
|
-
});
|
|
6632
|
-
function buildRequestParams(meta, range, context) {
|
|
6633
|
-
let { dateEnv, options } = context;
|
|
6634
|
-
let startParam;
|
|
6635
|
-
let endParam;
|
|
6636
|
-
let timeZoneParam;
|
|
6637
|
-
let customRequestParams;
|
|
6638
|
-
let params = {};
|
|
6639
|
-
startParam = meta.startParam;
|
|
6640
|
-
if (startParam == null) {
|
|
6641
|
-
startParam = options.startParam;
|
|
6642
|
-
}
|
|
6643
|
-
endParam = meta.endParam;
|
|
6644
|
-
if (endParam == null) {
|
|
6645
|
-
endParam = options.endParam;
|
|
6646
|
-
}
|
|
6647
|
-
timeZoneParam = meta.timeZoneParam;
|
|
6648
|
-
if (timeZoneParam == null) {
|
|
6649
|
-
timeZoneParam = options.timeZoneParam;
|
|
6650
|
-
}
|
|
6651
|
-
// retrieve any outbound GET/POST data from the options
|
|
6652
|
-
if (typeof meta.extraParams === 'function') {
|
|
6653
|
-
// supplied as a function that returns a key/value object
|
|
6654
|
-
customRequestParams = meta.extraParams();
|
|
6655
|
-
}
|
|
6656
|
-
else {
|
|
6657
|
-
// probably supplied as a straight key/value object
|
|
6658
|
-
customRequestParams = meta.extraParams || {};
|
|
6659
|
-
}
|
|
6660
|
-
Object.assign(params, customRequestParams);
|
|
6661
|
-
params[startParam] = dateEnv.formatIso(range.start);
|
|
6662
|
-
params[endParam] = dateEnv.formatIso(range.end);
|
|
6663
|
-
if (dateEnv.timeZone !== 'local') {
|
|
6664
|
-
params[timeZoneParam] = dateEnv.timeZone;
|
|
6665
|
-
}
|
|
6666
|
-
return params;
|
|
6667
|
-
}
|
|
6668
|
-
|
|
6669
|
-
const SIMPLE_RECURRING_REFINERS = {
|
|
6670
|
-
daysOfWeek: identity,
|
|
6671
|
-
startTime: createDuration,
|
|
6672
|
-
endTime: createDuration,
|
|
6673
|
-
duration: createDuration,
|
|
6674
|
-
startRecur: identity,
|
|
6675
|
-
endRecur: identity,
|
|
6676
|
-
};
|
|
6677
|
-
|
|
6678
|
-
let recurring = {
|
|
6679
|
-
parse(refined, dateEnv) {
|
|
6680
|
-
if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) {
|
|
6681
|
-
let recurringData = {
|
|
6682
|
-
daysOfWeek: refined.daysOfWeek || null,
|
|
6683
|
-
startTime: refined.startTime || null,
|
|
6684
|
-
endTime: refined.endTime || null,
|
|
6685
|
-
startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null,
|
|
6686
|
-
endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null,
|
|
6687
|
-
};
|
|
6688
|
-
let duration;
|
|
6689
|
-
if (refined.duration) {
|
|
6690
|
-
duration = refined.duration;
|
|
6691
|
-
}
|
|
6692
|
-
if (!duration && refined.startTime && refined.endTime) {
|
|
6693
|
-
duration = subtractDurations(refined.endTime, refined.startTime);
|
|
6694
|
-
}
|
|
6695
|
-
return {
|
|
6696
|
-
allDayGuess: Boolean(!refined.startTime && !refined.endTime),
|
|
6697
|
-
duration,
|
|
6698
|
-
typeData: recurringData, // doesn't need endTime anymore but oh well
|
|
6699
|
-
};
|
|
6700
|
-
}
|
|
6701
|
-
return null;
|
|
6702
|
-
},
|
|
6703
|
-
expand(typeData, framingRange, dateEnv) {
|
|
6704
|
-
let clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });
|
|
6705
|
-
if (clippedFramingRange) {
|
|
6706
|
-
return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv);
|
|
6707
|
-
}
|
|
6708
|
-
return [];
|
|
6709
|
-
},
|
|
6710
|
-
};
|
|
6711
|
-
const simpleRecurringEventsPlugin = createPlugin({
|
|
6712
|
-
name: 'simple-recurring-event',
|
|
6713
|
-
recurringTypes: [recurring],
|
|
6714
|
-
eventRefiners: SIMPLE_RECURRING_REFINERS,
|
|
6715
|
-
});
|
|
6716
|
-
function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
|
|
6717
|
-
let dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;
|
|
6718
|
-
let dayMarker = startOfDay(framingRange.start);
|
|
6719
|
-
let endMarker = framingRange.end;
|
|
6720
|
-
let instanceStarts = [];
|
|
6721
|
-
while (dayMarker < endMarker) {
|
|
6722
|
-
let instanceStart;
|
|
6723
|
-
// if everyday, or this particular day-of-week
|
|
6724
|
-
if (!dowHash || dowHash[dayMarker.getUTCDay()]) {
|
|
6725
|
-
if (startTime) {
|
|
6726
|
-
instanceStart = dateEnv.add(dayMarker, startTime);
|
|
6727
|
-
}
|
|
6728
|
-
else {
|
|
6729
|
-
instanceStart = dayMarker;
|
|
6730
|
-
}
|
|
6731
|
-
instanceStarts.push(instanceStart);
|
|
6732
|
-
}
|
|
6733
|
-
dayMarker = addDays(dayMarker, 1);
|
|
6734
|
-
}
|
|
6735
|
-
return instanceStarts;
|
|
6736
|
-
}
|
|
6737
|
-
|
|
6738
|
-
const changeHandlerPlugin = createPlugin({
|
|
6739
|
-
name: 'change-handler',
|
|
6740
|
-
optionChangeHandlers: {
|
|
6741
|
-
events(events, context) {
|
|
6742
|
-
handleEventSources([events], context);
|
|
6743
|
-
},
|
|
6744
|
-
eventSources: handleEventSources,
|
|
6745
|
-
},
|
|
6746
|
-
});
|
|
6747
|
-
/*
|
|
6748
|
-
BUG: if `event` was supplied, all previously-given `eventSources` will be wiped out
|
|
6749
|
-
*/
|
|
6750
|
-
function handleEventSources(inputs, context) {
|
|
6751
|
-
let unfoundSources = hashValuesToArray(context.getCurrentData().eventSources);
|
|
6752
|
-
let newInputs = [];
|
|
6753
|
-
for (let input of inputs) {
|
|
6754
|
-
let inputFound = false;
|
|
6755
|
-
for (let i = 0; i < unfoundSources.length; i += 1) {
|
|
6756
|
-
if (unfoundSources[i]._raw === input) {
|
|
6757
|
-
unfoundSources.splice(i, 1); // delete
|
|
6758
|
-
inputFound = true;
|
|
6759
|
-
break;
|
|
6760
|
-
}
|
|
6761
|
-
}
|
|
6762
|
-
if (!inputFound) {
|
|
6763
|
-
newInputs.push(input);
|
|
6764
|
-
}
|
|
6765
|
-
}
|
|
6766
|
-
for (let unfoundSource of unfoundSources) {
|
|
6767
|
-
context.dispatch({
|
|
6768
|
-
type: 'REMOVE_EVENT_SOURCE',
|
|
6769
|
-
sourceId: unfoundSource.sourceId,
|
|
6770
|
-
});
|
|
6771
|
-
}
|
|
6772
|
-
for (let newInput of newInputs) {
|
|
6773
|
-
context.calendarApi.addEventSource(newInput);
|
|
6774
|
-
}
|
|
6775
|
-
}
|
|
6776
|
-
|
|
6777
|
-
function handleDateProfile(dateProfile, context) {
|
|
6778
|
-
context.emitter.trigger('datesSet', Object.assign(Object.assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi }));
|
|
6779
|
-
}
|
|
6780
|
-
|
|
6781
|
-
function handleEventStore(eventStore, context) {
|
|
6782
|
-
let { emitter } = context;
|
|
6783
|
-
if (emitter.hasHandlers('eventsSet')) {
|
|
6784
|
-
emitter.trigger('eventsSet', buildEventApis(eventStore, context));
|
|
6785
|
-
}
|
|
6786
|
-
}
|
|
6787
|
-
|
|
6788
|
-
const EVENT_SOURCE_REFINERS = {
|
|
6789
|
-
id: String,
|
|
6790
|
-
defaultAllDay: Boolean,
|
|
6791
|
-
url: String,
|
|
6792
|
-
format: String,
|
|
6793
|
-
events: identity,
|
|
6794
|
-
eventDataTransform: identity,
|
|
6795
|
-
// for any network-related sources
|
|
6796
|
-
success: identity,
|
|
6797
|
-
failure: identity,
|
|
6798
|
-
};
|
|
6799
|
-
function parseEventSource(raw, context, refiners = buildEventSourceRefiners(context)) {
|
|
6800
|
-
let rawObj;
|
|
6801
|
-
if (typeof raw === 'string') {
|
|
6802
|
-
rawObj = { url: raw };
|
|
6803
|
-
}
|
|
6804
|
-
else if (typeof raw === 'function' || Array.isArray(raw)) {
|
|
6805
|
-
rawObj = { events: raw };
|
|
6806
|
-
}
|
|
6807
|
-
else if (typeof raw === 'object' && raw) { // not null
|
|
6808
|
-
rawObj = raw;
|
|
6809
|
-
}
|
|
6810
|
-
if (rawObj) {
|
|
6811
|
-
let { refined, extra } = refineProps(rawObj, refiners);
|
|
6812
|
-
let metaRes = buildEventSourceMeta(refined, context);
|
|
6813
|
-
if (metaRes) {
|
|
6814
|
-
return {
|
|
6815
|
-
_raw: raw,
|
|
6816
|
-
isFetching: false,
|
|
6817
|
-
latestFetchId: '',
|
|
6818
|
-
fetchRange: null,
|
|
6819
|
-
defaultAllDay: refined.defaultAllDay,
|
|
6820
|
-
eventDataTransform: refined.eventDataTransform,
|
|
6821
|
-
success: refined.success,
|
|
6822
|
-
failure: refined.failure,
|
|
6823
|
-
publicId: refined.id || '',
|
|
6824
|
-
sourceId: guid(),
|
|
6825
|
-
sourceDefId: metaRes.sourceDefId,
|
|
6826
|
-
meta: metaRes.meta,
|
|
6827
|
-
ui: createEventUi(refined, context),
|
|
6828
|
-
extendedProps: extra,
|
|
6829
|
-
};
|
|
6830
|
-
}
|
|
6831
|
-
}
|
|
6832
|
-
return null;
|
|
6833
|
-
}
|
|
6834
|
-
function buildEventSourceRefiners(context) {
|
|
6835
|
-
return Object.assign(Object.assign(Object.assign({}, EVENT_UI_REFINERS), EVENT_SOURCE_REFINERS), context.pluginHooks.eventSourceRefiners);
|
|
6836
|
-
}
|
|
6837
|
-
function buildEventSourceMeta(raw, context) {
|
|
6838
|
-
let defs = context.pluginHooks.eventSourceDefs;
|
|
6839
|
-
for (let i = defs.length - 1; i >= 0; i -= 1) { // later-added plugins take precedence
|
|
6840
|
-
let def = defs[i];
|
|
6841
|
-
let meta = def.parseMeta(raw);
|
|
6842
|
-
if (meta) {
|
|
6843
|
-
return { sourceDefId: i, meta };
|
|
6844
|
-
}
|
|
6845
|
-
}
|
|
6846
|
-
return null;
|
|
6847
|
-
}
|
|
6848
|
-
|
|
6849
|
-
function initEventSources(calendarOptions, dateProfile, context) {
|
|
6850
|
-
let activeRange = dateProfile ? dateProfile.activeRange : null;
|
|
6851
|
-
return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context);
|
|
6852
|
-
}
|
|
6853
|
-
function reduceEventSources(eventSources, action, dateProfile, context) {
|
|
6854
|
-
let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?
|
|
6855
|
-
switch (action.type) {
|
|
6856
|
-
case 'ADD_EVENT_SOURCES': // already parsed
|
|
6857
|
-
return addSources(eventSources, action.sources, activeRange, context);
|
|
6858
|
-
case 'REMOVE_EVENT_SOURCE':
|
|
6859
|
-
return removeSource(eventSources, action.sourceId);
|
|
6860
|
-
case 'PREV': // TODO: how do we track all actions that affect dateProfile :(
|
|
6861
|
-
case 'NEXT':
|
|
6862
|
-
case 'CHANGE_DATE':
|
|
6863
|
-
case 'CHANGE_VIEW_TYPE':
|
|
6864
|
-
if (dateProfile) {
|
|
6865
|
-
return fetchDirtySources(eventSources, activeRange, context);
|
|
6866
|
-
}
|
|
6867
|
-
return eventSources;
|
|
6868
|
-
case 'FETCH_EVENT_SOURCES':
|
|
6869
|
-
return fetchSourcesByIds(eventSources, action.sourceIds ? // why no type?
|
|
6870
|
-
arrayToHash(action.sourceIds) :
|
|
6871
|
-
excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context);
|
|
6872
|
-
case 'RECEIVE_EVENTS':
|
|
6873
|
-
case 'RECEIVE_EVENT_ERROR':
|
|
6874
|
-
return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange);
|
|
6875
|
-
case 'REMOVE_ALL_EVENT_SOURCES':
|
|
6876
|
-
return {};
|
|
6877
|
-
default:
|
|
6878
|
-
return eventSources;
|
|
6879
|
-
}
|
|
6880
|
-
}
|
|
6881
|
-
function reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) {
|
|
6882
|
-
let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?
|
|
6883
|
-
return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, true, context);
|
|
6884
|
-
}
|
|
6885
|
-
function computeEventSourcesLoading(eventSources) {
|
|
6886
|
-
for (let sourceId in eventSources) {
|
|
6887
|
-
if (eventSources[sourceId].isFetching) {
|
|
6888
|
-
return true;
|
|
6889
|
-
}
|
|
6890
|
-
}
|
|
6891
|
-
return false;
|
|
6892
|
-
}
|
|
6893
|
-
function addSources(eventSourceHash, sources, fetchRange, context) {
|
|
6894
|
-
let hash = {};
|
|
6895
|
-
for (let source of sources) {
|
|
6896
|
-
hash[source.sourceId] = source;
|
|
6897
|
-
}
|
|
6898
|
-
if (fetchRange) {
|
|
6899
|
-
hash = fetchDirtySources(hash, fetchRange, context);
|
|
6900
|
-
}
|
|
6901
|
-
return Object.assign(Object.assign({}, eventSourceHash), hash);
|
|
6902
|
-
}
|
|
6903
|
-
function removeSource(eventSourceHash, sourceId) {
|
|
6904
|
-
return filterHash(eventSourceHash, (eventSource) => eventSource.sourceId !== sourceId);
|
|
6905
|
-
}
|
|
6906
|
-
function fetchDirtySources(sourceHash, fetchRange, context) {
|
|
6907
|
-
return fetchSourcesByIds(sourceHash, filterHash(sourceHash, (eventSource) => isSourceDirty(eventSource, fetchRange, context)), fetchRange, false, context);
|
|
6908
|
-
}
|
|
6909
|
-
function isSourceDirty(eventSource, fetchRange, context) {
|
|
6910
|
-
if (!doesSourceNeedRange(eventSource, context)) {
|
|
6911
|
-
return !eventSource.latestFetchId;
|
|
6912
|
-
}
|
|
6913
|
-
return !context.options.lazyFetching ||
|
|
6914
|
-
!eventSource.fetchRange ||
|
|
6915
|
-
eventSource.isFetching || // always cancel outdated in-progress fetches
|
|
6916
|
-
fetchRange.start < eventSource.fetchRange.start ||
|
|
6917
|
-
fetchRange.end > eventSource.fetchRange.end;
|
|
6918
|
-
}
|
|
6919
|
-
function fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, context) {
|
|
6920
|
-
let nextSources = {};
|
|
6921
|
-
for (let sourceId in prevSources) {
|
|
6922
|
-
let source = prevSources[sourceId];
|
|
6923
|
-
if (sourceIdHash[sourceId]) {
|
|
6924
|
-
nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context);
|
|
6925
|
-
}
|
|
6926
|
-
else {
|
|
6927
|
-
nextSources[sourceId] = source;
|
|
6928
|
-
}
|
|
6929
|
-
}
|
|
6930
|
-
return nextSources;
|
|
6931
|
-
}
|
|
6932
|
-
function fetchSource(eventSource, fetchRange, isRefetch, context) {
|
|
6933
|
-
let { options, calendarApi } = context;
|
|
6934
|
-
let sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId];
|
|
6935
|
-
let fetchId = guid();
|
|
6936
|
-
sourceDef.fetch({
|
|
6937
|
-
eventSource,
|
|
6938
|
-
range: fetchRange,
|
|
6939
|
-
isRefetch,
|
|
6940
|
-
context,
|
|
6941
|
-
}, (res) => {
|
|
6942
|
-
let { rawEvents } = res;
|
|
6943
|
-
if (options.eventSourceSuccess) {
|
|
6944
|
-
rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.response) || rawEvents;
|
|
6945
|
-
}
|
|
6946
|
-
if (eventSource.success) {
|
|
6947
|
-
rawEvents = eventSource.success.call(calendarApi, rawEvents, res.response) || rawEvents;
|
|
6948
|
-
}
|
|
6949
|
-
context.dispatch({
|
|
6950
|
-
type: 'RECEIVE_EVENTS',
|
|
6951
|
-
sourceId: eventSource.sourceId,
|
|
6952
|
-
fetchId,
|
|
6953
|
-
fetchRange,
|
|
6954
|
-
rawEvents,
|
|
6955
|
-
});
|
|
6956
|
-
}, (error) => {
|
|
6957
|
-
let errorHandled = false;
|
|
6958
|
-
if (options.eventSourceFailure) {
|
|
6959
|
-
options.eventSourceFailure.call(calendarApi, error);
|
|
6960
|
-
errorHandled = true;
|
|
6961
|
-
}
|
|
6962
|
-
if (eventSource.failure) {
|
|
6963
|
-
eventSource.failure(error);
|
|
6964
|
-
errorHandled = true;
|
|
6965
|
-
}
|
|
6966
|
-
if (!errorHandled) {
|
|
6967
|
-
console.warn(error.message, error);
|
|
6968
|
-
}
|
|
6969
|
-
context.dispatch({
|
|
6970
|
-
type: 'RECEIVE_EVENT_ERROR',
|
|
6971
|
-
sourceId: eventSource.sourceId,
|
|
6972
|
-
fetchId,
|
|
6973
|
-
fetchRange,
|
|
6974
|
-
error,
|
|
6975
|
-
});
|
|
6976
|
-
});
|
|
6977
|
-
return Object.assign(Object.assign({}, eventSource), { isFetching: true, latestFetchId: fetchId });
|
|
6978
|
-
}
|
|
6979
|
-
function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) {
|
|
6980
|
-
let eventSource = sourceHash[sourceId];
|
|
6981
|
-
if (eventSource && // not already removed
|
|
6982
|
-
fetchId === eventSource.latestFetchId) {
|
|
6983
|
-
return Object.assign(Object.assign({}, sourceHash), { [sourceId]: Object.assign(Object.assign({}, eventSource), { isFetching: false, fetchRange }) });
|
|
6984
|
-
}
|
|
6985
|
-
return sourceHash;
|
|
6986
|
-
}
|
|
6987
|
-
function excludeStaticSources(eventSources, context) {
|
|
6988
|
-
return filterHash(eventSources, (eventSource) => doesSourceNeedRange(eventSource, context));
|
|
6989
|
-
}
|
|
6990
|
-
function parseInitialSources(rawOptions, context) {
|
|
6991
|
-
let refiners = buildEventSourceRefiners(context);
|
|
6992
|
-
let rawSources = [].concat(rawOptions.eventSources || []);
|
|
6993
|
-
let sources = []; // parsed
|
|
6994
|
-
if (rawOptions.initialEvents) {
|
|
6995
|
-
rawSources.unshift(rawOptions.initialEvents);
|
|
6996
|
-
}
|
|
6997
|
-
if (rawOptions.events) {
|
|
6998
|
-
rawSources.unshift(rawOptions.events);
|
|
6999
|
-
}
|
|
7000
|
-
for (let rawSource of rawSources) {
|
|
7001
|
-
let source = parseEventSource(rawSource, context, refiners);
|
|
7002
|
-
if (source) {
|
|
7003
|
-
sources.push(source);
|
|
7004
|
-
}
|
|
7005
|
-
}
|
|
7006
|
-
return sources;
|
|
7007
|
-
}
|
|
7008
|
-
function doesSourceNeedRange(eventSource, context) {
|
|
7009
|
-
let defs = context.pluginHooks.eventSourceDefs;
|
|
7010
|
-
return !defs[eventSource.sourceDefId].ignoreRange;
|
|
7011
|
-
}
|
|
7012
|
-
|
|
7013
|
-
/*
|
|
7014
|
-
this array is exposed on the root namespace so that UMD plugins can add to it.
|
|
7015
|
-
see the rollup-bundles script.
|
|
7016
|
-
*/
|
|
7017
|
-
const globalPlugins = [
|
|
7018
|
-
arrayEventSourcePlugin,
|
|
7019
|
-
funcEventSourcePlugin,
|
|
7020
|
-
jsonFeedEventSourcePlugin,
|
|
7021
|
-
simpleRecurringEventsPlugin,
|
|
7022
|
-
changeHandlerPlugin,
|
|
7023
|
-
createPlugin({
|
|
7024
|
-
name: 'misc',
|
|
7025
|
-
isLoadingFuncs: [
|
|
7026
|
-
(state) => computeEventSourcesLoading(state.eventSources),
|
|
7027
|
-
],
|
|
7028
|
-
propSetHandlers: {
|
|
7029
|
-
dateProfile: handleDateProfile,
|
|
7030
|
-
eventStore: handleEventStore,
|
|
7031
|
-
},
|
|
7032
|
-
}),
|
|
7033
|
-
];
|
|
7034
|
-
|
|
7035
|
-
class EventContainer extends BaseComponent {
|
|
7036
|
-
constructor() {
|
|
7037
|
-
super(...arguments);
|
|
7038
|
-
this.handleEl = (el) => {
|
|
7039
|
-
if (el) {
|
|
7040
|
-
setElSeg(el, this.props.seg);
|
|
7041
|
-
}
|
|
7042
|
-
// TODO: when null, should unset to avoid memory leaks?
|
|
7043
|
-
};
|
|
7044
|
-
}
|
|
7045
|
-
render() {
|
|
7046
|
-
const { props, context } = this;
|
|
7047
|
-
const { options } = context;
|
|
7048
|
-
const { seg } = props;
|
|
7049
|
-
const { eventRange } = seg;
|
|
7050
|
-
const { ui } = eventRange;
|
|
7051
|
-
const renderProps = {
|
|
7052
|
-
event: new EventImpl(context, eventRange.def, eventRange.instance),
|
|
7053
|
-
view: context.viewApi,
|
|
7054
|
-
timeText: props.timeText,
|
|
7055
|
-
textColor: ui.textColor,
|
|
7056
|
-
backgroundColor: ui.backgroundColor,
|
|
7057
|
-
borderColor: ui.borderColor,
|
|
7058
|
-
isDraggable: !props.disableDragging && computeSegDraggable(seg, context),
|
|
7059
|
-
isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),
|
|
7060
|
-
isEndResizable: !props.disableResizing && computeSegEndResizable(seg),
|
|
7061
|
-
isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
|
|
7062
|
-
isStart: Boolean(seg.isStart),
|
|
7063
|
-
isEnd: Boolean(seg.isEnd),
|
|
7064
|
-
isPast: Boolean(props.isPast),
|
|
7065
|
-
isFuture: Boolean(props.isFuture),
|
|
7066
|
-
isToday: Boolean(props.isToday),
|
|
7067
|
-
isSelected: Boolean(props.isSelected),
|
|
7068
|
-
isDragging: Boolean(props.isDragging),
|
|
7069
|
-
isResizing: Boolean(props.isResizing),
|
|
7070
|
-
};
|
|
7071
|
-
return (h(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
|
|
7072
|
-
...getEventClassNames(renderProps),
|
|
7073
|
-
...seg.eventRange.ui.classNames,
|
|
7074
|
-
...(props.elClasses || []),
|
|
7075
|
-
], renderProps: renderProps, generatorName: "eventContent", generator: options.eventContent || props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
|
|
7076
|
-
}
|
|
7077
|
-
}
|
|
7078
|
-
|
|
7079
|
-
// should not be a purecomponent
|
|
7080
|
-
class StandardEvent extends BaseComponent {
|
|
7081
|
-
render() {
|
|
7082
|
-
let { props, context } = this;
|
|
7083
|
-
let { options } = context;
|
|
7084
|
-
let { seg } = props;
|
|
7085
|
-
let { ui } = seg.eventRange;
|
|
7086
|
-
let timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
|
|
7087
|
-
let timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);
|
|
7088
|
-
return (h(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: {
|
|
7089
|
-
borderColor: ui.borderColor,
|
|
7090
|
-
backgroundColor: ui.backgroundColor,
|
|
7091
|
-
}, elAttrs: getSegAnchorAttrs(seg, context), defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (h(p, null,
|
|
7092
|
-
h(InnerContent, { elTag: "div", elClasses: ['fc-event-main'], elStyle: { color: eventContentArg.textColor } }),
|
|
7093
|
-
Boolean(eventContentArg.isStartResizable) && (h("div", { className: "fc-event-resizer fc-event-resizer-start" })),
|
|
7094
|
-
Boolean(eventContentArg.isEndResizable) && (h("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
|
|
7095
|
-
}
|
|
7096
|
-
}
|
|
7097
|
-
function renderInnerContent$1(innerProps) {
|
|
7098
|
-
return (h("div", { className: "fc-event-main-frame" },
|
|
7099
|
-
innerProps.timeText && (h("div", { className: "fc-event-time" }, innerProps.timeText)),
|
|
7100
|
-
h("div", { className: "fc-event-title-container" },
|
|
7101
|
-
h("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || h(p, null, "\u00A0")))));
|
|
7102
|
-
}
|
|
7103
|
-
|
|
7104
|
-
const NowIndicatorContainer = (props) => (h(ViewContextType.Consumer, null, (context) => {
|
|
7105
|
-
let { options } = context;
|
|
7106
|
-
let renderProps = {
|
|
7107
|
-
isAxis: props.isAxis,
|
|
7108
|
-
date: context.dateEnv.toDate(props.date),
|
|
7109
|
-
view: context.viewApi,
|
|
7110
|
-
};
|
|
7111
|
-
return (h(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", generator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
|
|
7112
|
-
}));
|
|
7113
|
-
|
|
7114
|
-
const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
|
|
7115
|
-
class DayCellContainer extends BaseComponent {
|
|
7116
|
-
constructor() {
|
|
7117
|
-
super(...arguments);
|
|
7118
|
-
this.refineRenderProps = memoizeObjArg(refineRenderProps);
|
|
7119
|
-
}
|
|
7120
|
-
render() {
|
|
7121
|
-
let { props, context } = this;
|
|
7122
|
-
let { options } = context;
|
|
7123
|
-
let renderProps = this.refineRenderProps({
|
|
7124
|
-
date: props.date,
|
|
7125
|
-
dateProfile: props.dateProfile,
|
|
7126
|
-
todayRange: props.todayRange,
|
|
7127
|
-
showDayNumber: props.showDayNumber,
|
|
7128
|
-
extraRenderProps: props.extraRenderProps,
|
|
7129
|
-
viewApi: context.viewApi,
|
|
7130
|
-
dateEnv: context.dateEnv,
|
|
7131
|
-
});
|
|
7132
|
-
return (h(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
|
|
7133
|
-
...getDayClassNames(renderProps, context.theme),
|
|
7134
|
-
...(props.elClasses || []),
|
|
7135
|
-
], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", generator: options.dayCellContent || props.defaultGenerator, classNameGenerator:
|
|
7136
|
-
// don't use custom classNames if disabled
|
|
7137
|
-
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
|
|
6498
|
+
render() {
|
|
6499
|
+
let { props, context } = this;
|
|
6500
|
+
let { options } = context;
|
|
6501
|
+
let renderProps = this.refineRenderProps({
|
|
6502
|
+
date: props.date,
|
|
6503
|
+
dateProfile: props.dateProfile,
|
|
6504
|
+
todayRange: props.todayRange,
|
|
6505
|
+
showDayNumber: props.showDayNumber,
|
|
6506
|
+
extraRenderProps: props.extraRenderProps,
|
|
6507
|
+
viewApi: context.viewApi,
|
|
6508
|
+
dateEnv: context.dateEnv,
|
|
6509
|
+
});
|
|
6510
|
+
return (h(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
|
|
6511
|
+
...getDayClassNames(renderProps, context.theme),
|
|
6512
|
+
...(props.elClasses || []),
|
|
6513
|
+
], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", generator: options.dayCellContent || props.defaultGenerator, classNameGenerator:
|
|
6514
|
+
// don't use custom classNames if disabled
|
|
6515
|
+
renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
|
|
7138
6516
|
}
|
|
7139
6517
|
}
|
|
7140
6518
|
function hasCustomDayCellContent(options) {
|
|
@@ -7449,6 +6827,67 @@ var FullCalendar = (function (exports) {
|
|
|
7449
6827
|
}
|
|
7450
6828
|
}
|
|
7451
6829
|
|
|
6830
|
+
const EVENT_SOURCE_REFINERS = {
|
|
6831
|
+
id: String,
|
|
6832
|
+
defaultAllDay: Boolean,
|
|
6833
|
+
url: String,
|
|
6834
|
+
format: String,
|
|
6835
|
+
events: identity,
|
|
6836
|
+
eventDataTransform: identity,
|
|
6837
|
+
// for any network-related sources
|
|
6838
|
+
success: identity,
|
|
6839
|
+
failure: identity,
|
|
6840
|
+
};
|
|
6841
|
+
function parseEventSource(raw, context, refiners = buildEventSourceRefiners(context)) {
|
|
6842
|
+
let rawObj;
|
|
6843
|
+
if (typeof raw === 'string') {
|
|
6844
|
+
rawObj = { url: raw };
|
|
6845
|
+
}
|
|
6846
|
+
else if (typeof raw === 'function' || Array.isArray(raw)) {
|
|
6847
|
+
rawObj = { events: raw };
|
|
6848
|
+
}
|
|
6849
|
+
else if (typeof raw === 'object' && raw) { // not null
|
|
6850
|
+
rawObj = raw;
|
|
6851
|
+
}
|
|
6852
|
+
if (rawObj) {
|
|
6853
|
+
let { refined, extra } = refineProps(rawObj, refiners);
|
|
6854
|
+
let metaRes = buildEventSourceMeta(refined, context);
|
|
6855
|
+
if (metaRes) {
|
|
6856
|
+
return {
|
|
6857
|
+
_raw: raw,
|
|
6858
|
+
isFetching: false,
|
|
6859
|
+
latestFetchId: '',
|
|
6860
|
+
fetchRange: null,
|
|
6861
|
+
defaultAllDay: refined.defaultAllDay,
|
|
6862
|
+
eventDataTransform: refined.eventDataTransform,
|
|
6863
|
+
success: refined.success,
|
|
6864
|
+
failure: refined.failure,
|
|
6865
|
+
publicId: refined.id || '',
|
|
6866
|
+
sourceId: guid(),
|
|
6867
|
+
sourceDefId: metaRes.sourceDefId,
|
|
6868
|
+
meta: metaRes.meta,
|
|
6869
|
+
ui: createEventUi(refined, context),
|
|
6870
|
+
extendedProps: extra,
|
|
6871
|
+
};
|
|
6872
|
+
}
|
|
6873
|
+
}
|
|
6874
|
+
return null;
|
|
6875
|
+
}
|
|
6876
|
+
function buildEventSourceRefiners(context) {
|
|
6877
|
+
return Object.assign(Object.assign(Object.assign({}, EVENT_UI_REFINERS), EVENT_SOURCE_REFINERS), context.pluginHooks.eventSourceRefiners);
|
|
6878
|
+
}
|
|
6879
|
+
function buildEventSourceMeta(raw, context) {
|
|
6880
|
+
let defs = context.pluginHooks.eventSourceDefs;
|
|
6881
|
+
for (let i = defs.length - 1; i >= 0; i -= 1) { // later-added plugins take precedence
|
|
6882
|
+
let def = defs[i];
|
|
6883
|
+
let meta = def.parseMeta(raw);
|
|
6884
|
+
if (meta) {
|
|
6885
|
+
return { sourceDefId: i, meta };
|
|
6886
|
+
}
|
|
6887
|
+
}
|
|
6888
|
+
return null;
|
|
6889
|
+
}
|
|
6890
|
+
|
|
7452
6891
|
class CalendarImpl {
|
|
7453
6892
|
getCurrentData() {
|
|
7454
6893
|
return this.currentDataManager.getCurrentData();
|
|
@@ -7992,7 +7431,6 @@ var FullCalendar = (function (exports) {
|
|
|
7992
7431
|
interactionSettingsStore: interactionSettingsStore,
|
|
7993
7432
|
ElementDragging: ElementDragging,
|
|
7994
7433
|
config: config,
|
|
7995
|
-
globalLocales: globalLocales,
|
|
7996
7434
|
parseDragMeta: parseDragMeta,
|
|
7997
7435
|
CalendarRoot: CalendarRoot,
|
|
7998
7436
|
DayHeader: DayHeader,
|
|
@@ -8038,7 +7476,6 @@ var FullCalendar = (function (exports) {
|
|
|
8038
7476
|
getIsRtlScrollbarOnLeft: getIsRtlScrollbarOnLeft,
|
|
8039
7477
|
NowTimer: NowTimer,
|
|
8040
7478
|
ScrollResponder: ScrollResponder,
|
|
8041
|
-
globalPlugins: globalPlugins,
|
|
8042
7479
|
StandardEvent: StandardEvent,
|
|
8043
7480
|
NowIndicatorContainer: NowIndicatorContainer,
|
|
8044
7481
|
DayCellContainer: DayCellContainer,
|
|
@@ -8064,6 +7501,8 @@ var FullCalendar = (function (exports) {
|
|
|
8064
7501
|
var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-unselectable{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;user-select:none}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url(\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\") format(\"truetype\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button::-moz-focus-inner{border-style:none;padding:0}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}";
|
|
8065
7502
|
injectStyles(css_248z);
|
|
8066
7503
|
|
|
7504
|
+
const globalLocales = [];
|
|
7505
|
+
|
|
8067
7506
|
const MINIMAL_RAW_EN_LOCALE = {
|
|
8068
7507
|
code: 'en',
|
|
8069
7508
|
week: {
|
|
@@ -8115,47 +7554,206 @@ var FullCalendar = (function (exports) {
|
|
|
8115
7554
|
for (let rawLocale of allRawLocales) {
|
|
8116
7555
|
rawLocaleMap[rawLocale.code] = rawLocale;
|
|
8117
7556
|
}
|
|
8118
|
-
return {
|
|
8119
|
-
map: rawLocaleMap,
|
|
8120
|
-
defaultCode,
|
|
8121
|
-
};
|
|
8122
|
-
}
|
|
8123
|
-
function buildLocale(inputSingular, available) {
|
|
8124
|
-
if (typeof inputSingular === 'object' && !Array.isArray(inputSingular)) {
|
|
8125
|
-
return parseLocale(inputSingular.code, [inputSingular.code], inputSingular);
|
|
7557
|
+
return {
|
|
7558
|
+
map: rawLocaleMap,
|
|
7559
|
+
defaultCode,
|
|
7560
|
+
};
|
|
7561
|
+
}
|
|
7562
|
+
function buildLocale(inputSingular, available) {
|
|
7563
|
+
if (typeof inputSingular === 'object' && !Array.isArray(inputSingular)) {
|
|
7564
|
+
return parseLocale(inputSingular.code, [inputSingular.code], inputSingular);
|
|
7565
|
+
}
|
|
7566
|
+
return queryLocale(inputSingular, available);
|
|
7567
|
+
}
|
|
7568
|
+
function queryLocale(codeArg, available) {
|
|
7569
|
+
let codes = [].concat(codeArg || []); // will convert to array
|
|
7570
|
+
let raw = queryRawLocale(codes, available) || RAW_EN_LOCALE;
|
|
7571
|
+
return parseLocale(codeArg, codes, raw);
|
|
7572
|
+
}
|
|
7573
|
+
function queryRawLocale(codes, available) {
|
|
7574
|
+
for (let i = 0; i < codes.length; i += 1) {
|
|
7575
|
+
let parts = codes[i].toLocaleLowerCase().split('-');
|
|
7576
|
+
for (let j = parts.length; j > 0; j -= 1) {
|
|
7577
|
+
let simpleId = parts.slice(0, j).join('-');
|
|
7578
|
+
if (available[simpleId]) {
|
|
7579
|
+
return available[simpleId];
|
|
7580
|
+
}
|
|
7581
|
+
}
|
|
7582
|
+
}
|
|
7583
|
+
return null;
|
|
7584
|
+
}
|
|
7585
|
+
function parseLocale(codeArg, codes, raw) {
|
|
7586
|
+
let merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ['buttonText']);
|
|
7587
|
+
delete merged.code; // don't want this part of the options
|
|
7588
|
+
let { week } = merged;
|
|
7589
|
+
delete merged.week;
|
|
7590
|
+
return {
|
|
7591
|
+
codeArg,
|
|
7592
|
+
codes,
|
|
7593
|
+
week,
|
|
7594
|
+
simpleNumberFormat: new Intl.NumberFormat(codeArg),
|
|
7595
|
+
options: merged,
|
|
7596
|
+
};
|
|
7597
|
+
}
|
|
7598
|
+
|
|
7599
|
+
// TODO: easier way to add new hooks? need to update a million things
|
|
7600
|
+
function createPlugin(input) {
|
|
7601
|
+
return {
|
|
7602
|
+
id: guid(),
|
|
7603
|
+
name: input.name,
|
|
7604
|
+
premiumReleaseDate: input.premiumReleaseDate ? new Date(input.premiumReleaseDate) : undefined,
|
|
7605
|
+
deps: input.deps || [],
|
|
7606
|
+
reducers: input.reducers || [],
|
|
7607
|
+
isLoadingFuncs: input.isLoadingFuncs || [],
|
|
7608
|
+
contextInit: [].concat(input.contextInit || []),
|
|
7609
|
+
eventRefiners: input.eventRefiners || {},
|
|
7610
|
+
eventDefMemberAdders: input.eventDefMemberAdders || [],
|
|
7611
|
+
eventSourceRefiners: input.eventSourceRefiners || {},
|
|
7612
|
+
isDraggableTransformers: input.isDraggableTransformers || [],
|
|
7613
|
+
eventDragMutationMassagers: input.eventDragMutationMassagers || [],
|
|
7614
|
+
eventDefMutationAppliers: input.eventDefMutationAppliers || [],
|
|
7615
|
+
dateSelectionTransformers: input.dateSelectionTransformers || [],
|
|
7616
|
+
datePointTransforms: input.datePointTransforms || [],
|
|
7617
|
+
dateSpanTransforms: input.dateSpanTransforms || [],
|
|
7618
|
+
views: input.views || {},
|
|
7619
|
+
viewPropsTransformers: input.viewPropsTransformers || [],
|
|
7620
|
+
isPropsValid: input.isPropsValid || null,
|
|
7621
|
+
externalDefTransforms: input.externalDefTransforms || [],
|
|
7622
|
+
viewContainerAppends: input.viewContainerAppends || [],
|
|
7623
|
+
eventDropTransformers: input.eventDropTransformers || [],
|
|
7624
|
+
componentInteractions: input.componentInteractions || [],
|
|
7625
|
+
calendarInteractions: input.calendarInteractions || [],
|
|
7626
|
+
themeClasses: input.themeClasses || {},
|
|
7627
|
+
eventSourceDefs: input.eventSourceDefs || [],
|
|
7628
|
+
cmdFormatter: input.cmdFormatter,
|
|
7629
|
+
recurringTypes: input.recurringTypes || [],
|
|
7630
|
+
namedTimeZonedImpl: input.namedTimeZonedImpl,
|
|
7631
|
+
initialView: input.initialView || '',
|
|
7632
|
+
elementDraggingImpl: input.elementDraggingImpl,
|
|
7633
|
+
optionChangeHandlers: input.optionChangeHandlers || {},
|
|
7634
|
+
scrollGridImpl: input.scrollGridImpl || null,
|
|
7635
|
+
listenerRefiners: input.listenerRefiners || {},
|
|
7636
|
+
optionRefiners: input.optionRefiners || {},
|
|
7637
|
+
propSetHandlers: input.propSetHandlers || {},
|
|
7638
|
+
};
|
|
7639
|
+
}
|
|
7640
|
+
function buildPluginHooks(pluginDefs, globalDefs) {
|
|
7641
|
+
let currentPluginIds = {};
|
|
7642
|
+
let hooks = {
|
|
7643
|
+
premiumReleaseDate: undefined,
|
|
7644
|
+
reducers: [],
|
|
7645
|
+
isLoadingFuncs: [],
|
|
7646
|
+
contextInit: [],
|
|
7647
|
+
eventRefiners: {},
|
|
7648
|
+
eventDefMemberAdders: [],
|
|
7649
|
+
eventSourceRefiners: {},
|
|
7650
|
+
isDraggableTransformers: [],
|
|
7651
|
+
eventDragMutationMassagers: [],
|
|
7652
|
+
eventDefMutationAppliers: [],
|
|
7653
|
+
dateSelectionTransformers: [],
|
|
7654
|
+
datePointTransforms: [],
|
|
7655
|
+
dateSpanTransforms: [],
|
|
7656
|
+
views: {},
|
|
7657
|
+
viewPropsTransformers: [],
|
|
7658
|
+
isPropsValid: null,
|
|
7659
|
+
externalDefTransforms: [],
|
|
7660
|
+
viewContainerAppends: [],
|
|
7661
|
+
eventDropTransformers: [],
|
|
7662
|
+
componentInteractions: [],
|
|
7663
|
+
calendarInteractions: [],
|
|
7664
|
+
themeClasses: {},
|
|
7665
|
+
eventSourceDefs: [],
|
|
7666
|
+
cmdFormatter: null,
|
|
7667
|
+
recurringTypes: [],
|
|
7668
|
+
namedTimeZonedImpl: null,
|
|
7669
|
+
initialView: '',
|
|
7670
|
+
elementDraggingImpl: null,
|
|
7671
|
+
optionChangeHandlers: {},
|
|
7672
|
+
scrollGridImpl: null,
|
|
7673
|
+
listenerRefiners: {},
|
|
7674
|
+
optionRefiners: {},
|
|
7675
|
+
propSetHandlers: {},
|
|
7676
|
+
};
|
|
7677
|
+
function addDefs(defs) {
|
|
7678
|
+
for (let def of defs) {
|
|
7679
|
+
const pluginName = def.name;
|
|
7680
|
+
const currentId = currentPluginIds[pluginName];
|
|
7681
|
+
if (currentId === undefined) {
|
|
7682
|
+
currentPluginIds[pluginName] = def.id;
|
|
7683
|
+
addDefs(def.deps);
|
|
7684
|
+
hooks = combineHooks(hooks, def);
|
|
7685
|
+
}
|
|
7686
|
+
else if (currentId !== def.id) {
|
|
7687
|
+
// different ID than the one already added
|
|
7688
|
+
console.warn(`Duplicate plugin '${pluginName}'`);
|
|
7689
|
+
}
|
|
7690
|
+
}
|
|
7691
|
+
}
|
|
7692
|
+
if (pluginDefs) {
|
|
7693
|
+
addDefs(pluginDefs);
|
|
8126
7694
|
}
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
function queryLocale(codeArg, available) {
|
|
8130
|
-
let codes = [].concat(codeArg || []); // will convert to array
|
|
8131
|
-
let raw = queryRawLocale(codes, available) || RAW_EN_LOCALE;
|
|
8132
|
-
return parseLocale(codeArg, codes, raw);
|
|
7695
|
+
addDefs(globalDefs);
|
|
7696
|
+
return hooks;
|
|
8133
7697
|
}
|
|
8134
|
-
function
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
}
|
|
7698
|
+
function buildBuildPluginHooks() {
|
|
7699
|
+
let currentOverrideDefs = [];
|
|
7700
|
+
let currentGlobalDefs = [];
|
|
7701
|
+
let currentHooks;
|
|
7702
|
+
return (overrideDefs, globalDefs) => {
|
|
7703
|
+
if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) {
|
|
7704
|
+
currentHooks = buildPluginHooks(overrideDefs, globalDefs);
|
|
8142
7705
|
}
|
|
8143
|
-
|
|
8144
|
-
|
|
7706
|
+
currentOverrideDefs = overrideDefs;
|
|
7707
|
+
currentGlobalDefs = globalDefs;
|
|
7708
|
+
return currentHooks;
|
|
7709
|
+
};
|
|
8145
7710
|
}
|
|
8146
|
-
function
|
|
8147
|
-
let merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ['buttonText']);
|
|
8148
|
-
delete merged.code; // don't want this part of the options
|
|
8149
|
-
let { week } = merged;
|
|
8150
|
-
delete merged.week;
|
|
7711
|
+
function combineHooks(hooks0, hooks1) {
|
|
8151
7712
|
return {
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
7713
|
+
premiumReleaseDate: compareOptionalDates(hooks0.premiumReleaseDate, hooks1.premiumReleaseDate),
|
|
7714
|
+
reducers: hooks0.reducers.concat(hooks1.reducers),
|
|
7715
|
+
isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs),
|
|
7716
|
+
contextInit: hooks0.contextInit.concat(hooks1.contextInit),
|
|
7717
|
+
eventRefiners: Object.assign(Object.assign({}, hooks0.eventRefiners), hooks1.eventRefiners),
|
|
7718
|
+
eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders),
|
|
7719
|
+
eventSourceRefiners: Object.assign(Object.assign({}, hooks0.eventSourceRefiners), hooks1.eventSourceRefiners),
|
|
7720
|
+
isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),
|
|
7721
|
+
eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),
|
|
7722
|
+
eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),
|
|
7723
|
+
dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),
|
|
7724
|
+
datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),
|
|
7725
|
+
dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),
|
|
7726
|
+
views: Object.assign(Object.assign({}, hooks0.views), hooks1.views),
|
|
7727
|
+
viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),
|
|
7728
|
+
isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,
|
|
7729
|
+
externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),
|
|
7730
|
+
viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends),
|
|
7731
|
+
eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),
|
|
7732
|
+
calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),
|
|
7733
|
+
componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),
|
|
7734
|
+
themeClasses: Object.assign(Object.assign({}, hooks0.themeClasses), hooks1.themeClasses),
|
|
7735
|
+
eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),
|
|
7736
|
+
cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,
|
|
7737
|
+
recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),
|
|
7738
|
+
namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl,
|
|
7739
|
+
initialView: hooks0.initialView || hooks1.initialView,
|
|
7740
|
+
elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,
|
|
7741
|
+
optionChangeHandlers: Object.assign(Object.assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers),
|
|
7742
|
+
scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl,
|
|
7743
|
+
listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
|
|
7744
|
+
optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners),
|
|
7745
|
+
propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
|
|
8157
7746
|
};
|
|
8158
7747
|
}
|
|
7748
|
+
function compareOptionalDates(date0, date1) {
|
|
7749
|
+
if (date0 === undefined) {
|
|
7750
|
+
return date1;
|
|
7751
|
+
}
|
|
7752
|
+
if (date1 === undefined) {
|
|
7753
|
+
return date0;
|
|
7754
|
+
}
|
|
7755
|
+
return new Date(Math.max(date0.valueOf(), date1.valueOf()));
|
|
7756
|
+
}
|
|
8159
7757
|
|
|
8160
7758
|
class StandardTheme extends Theme {
|
|
8161
7759
|
}
|
|
@@ -8386,6 +7984,170 @@ var FullCalendar = (function (exports) {
|
|
|
8386
7984
|
return currentDateProfile;
|
|
8387
7985
|
}
|
|
8388
7986
|
|
|
7987
|
+
function initEventSources(calendarOptions, dateProfile, context) {
|
|
7988
|
+
let activeRange = dateProfile ? dateProfile.activeRange : null;
|
|
7989
|
+
return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context);
|
|
7990
|
+
}
|
|
7991
|
+
function reduceEventSources(eventSources, action, dateProfile, context) {
|
|
7992
|
+
let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?
|
|
7993
|
+
switch (action.type) {
|
|
7994
|
+
case 'ADD_EVENT_SOURCES': // already parsed
|
|
7995
|
+
return addSources(eventSources, action.sources, activeRange, context);
|
|
7996
|
+
case 'REMOVE_EVENT_SOURCE':
|
|
7997
|
+
return removeSource(eventSources, action.sourceId);
|
|
7998
|
+
case 'PREV': // TODO: how do we track all actions that affect dateProfile :(
|
|
7999
|
+
case 'NEXT':
|
|
8000
|
+
case 'CHANGE_DATE':
|
|
8001
|
+
case 'CHANGE_VIEW_TYPE':
|
|
8002
|
+
if (dateProfile) {
|
|
8003
|
+
return fetchDirtySources(eventSources, activeRange, context);
|
|
8004
|
+
}
|
|
8005
|
+
return eventSources;
|
|
8006
|
+
case 'FETCH_EVENT_SOURCES':
|
|
8007
|
+
return fetchSourcesByIds(eventSources, action.sourceIds ? // why no type?
|
|
8008
|
+
arrayToHash(action.sourceIds) :
|
|
8009
|
+
excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context);
|
|
8010
|
+
case 'RECEIVE_EVENTS':
|
|
8011
|
+
case 'RECEIVE_EVENT_ERROR':
|
|
8012
|
+
return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange);
|
|
8013
|
+
case 'REMOVE_ALL_EVENT_SOURCES':
|
|
8014
|
+
return {};
|
|
8015
|
+
default:
|
|
8016
|
+
return eventSources;
|
|
8017
|
+
}
|
|
8018
|
+
}
|
|
8019
|
+
function reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) {
|
|
8020
|
+
let activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?
|
|
8021
|
+
return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, true, context);
|
|
8022
|
+
}
|
|
8023
|
+
function computeEventSourcesLoading(eventSources) {
|
|
8024
|
+
for (let sourceId in eventSources) {
|
|
8025
|
+
if (eventSources[sourceId].isFetching) {
|
|
8026
|
+
return true;
|
|
8027
|
+
}
|
|
8028
|
+
}
|
|
8029
|
+
return false;
|
|
8030
|
+
}
|
|
8031
|
+
function addSources(eventSourceHash, sources, fetchRange, context) {
|
|
8032
|
+
let hash = {};
|
|
8033
|
+
for (let source of sources) {
|
|
8034
|
+
hash[source.sourceId] = source;
|
|
8035
|
+
}
|
|
8036
|
+
if (fetchRange) {
|
|
8037
|
+
hash = fetchDirtySources(hash, fetchRange, context);
|
|
8038
|
+
}
|
|
8039
|
+
return Object.assign(Object.assign({}, eventSourceHash), hash);
|
|
8040
|
+
}
|
|
8041
|
+
function removeSource(eventSourceHash, sourceId) {
|
|
8042
|
+
return filterHash(eventSourceHash, (eventSource) => eventSource.sourceId !== sourceId);
|
|
8043
|
+
}
|
|
8044
|
+
function fetchDirtySources(sourceHash, fetchRange, context) {
|
|
8045
|
+
return fetchSourcesByIds(sourceHash, filterHash(sourceHash, (eventSource) => isSourceDirty(eventSource, fetchRange, context)), fetchRange, false, context);
|
|
8046
|
+
}
|
|
8047
|
+
function isSourceDirty(eventSource, fetchRange, context) {
|
|
8048
|
+
if (!doesSourceNeedRange(eventSource, context)) {
|
|
8049
|
+
return !eventSource.latestFetchId;
|
|
8050
|
+
}
|
|
8051
|
+
return !context.options.lazyFetching ||
|
|
8052
|
+
!eventSource.fetchRange ||
|
|
8053
|
+
eventSource.isFetching || // always cancel outdated in-progress fetches
|
|
8054
|
+
fetchRange.start < eventSource.fetchRange.start ||
|
|
8055
|
+
fetchRange.end > eventSource.fetchRange.end;
|
|
8056
|
+
}
|
|
8057
|
+
function fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, context) {
|
|
8058
|
+
let nextSources = {};
|
|
8059
|
+
for (let sourceId in prevSources) {
|
|
8060
|
+
let source = prevSources[sourceId];
|
|
8061
|
+
if (sourceIdHash[sourceId]) {
|
|
8062
|
+
nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context);
|
|
8063
|
+
}
|
|
8064
|
+
else {
|
|
8065
|
+
nextSources[sourceId] = source;
|
|
8066
|
+
}
|
|
8067
|
+
}
|
|
8068
|
+
return nextSources;
|
|
8069
|
+
}
|
|
8070
|
+
function fetchSource(eventSource, fetchRange, isRefetch, context) {
|
|
8071
|
+
let { options, calendarApi } = context;
|
|
8072
|
+
let sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId];
|
|
8073
|
+
let fetchId = guid();
|
|
8074
|
+
sourceDef.fetch({
|
|
8075
|
+
eventSource,
|
|
8076
|
+
range: fetchRange,
|
|
8077
|
+
isRefetch,
|
|
8078
|
+
context,
|
|
8079
|
+
}, (res) => {
|
|
8080
|
+
let { rawEvents } = res;
|
|
8081
|
+
if (options.eventSourceSuccess) {
|
|
8082
|
+
rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.response) || rawEvents;
|
|
8083
|
+
}
|
|
8084
|
+
if (eventSource.success) {
|
|
8085
|
+
rawEvents = eventSource.success.call(calendarApi, rawEvents, res.response) || rawEvents;
|
|
8086
|
+
}
|
|
8087
|
+
context.dispatch({
|
|
8088
|
+
type: 'RECEIVE_EVENTS',
|
|
8089
|
+
sourceId: eventSource.sourceId,
|
|
8090
|
+
fetchId,
|
|
8091
|
+
fetchRange,
|
|
8092
|
+
rawEvents,
|
|
8093
|
+
});
|
|
8094
|
+
}, (error) => {
|
|
8095
|
+
let errorHandled = false;
|
|
8096
|
+
if (options.eventSourceFailure) {
|
|
8097
|
+
options.eventSourceFailure.call(calendarApi, error);
|
|
8098
|
+
errorHandled = true;
|
|
8099
|
+
}
|
|
8100
|
+
if (eventSource.failure) {
|
|
8101
|
+
eventSource.failure(error);
|
|
8102
|
+
errorHandled = true;
|
|
8103
|
+
}
|
|
8104
|
+
if (!errorHandled) {
|
|
8105
|
+
console.warn(error.message, error);
|
|
8106
|
+
}
|
|
8107
|
+
context.dispatch({
|
|
8108
|
+
type: 'RECEIVE_EVENT_ERROR',
|
|
8109
|
+
sourceId: eventSource.sourceId,
|
|
8110
|
+
fetchId,
|
|
8111
|
+
fetchRange,
|
|
8112
|
+
error,
|
|
8113
|
+
});
|
|
8114
|
+
});
|
|
8115
|
+
return Object.assign(Object.assign({}, eventSource), { isFetching: true, latestFetchId: fetchId });
|
|
8116
|
+
}
|
|
8117
|
+
function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) {
|
|
8118
|
+
let eventSource = sourceHash[sourceId];
|
|
8119
|
+
if (eventSource && // not already removed
|
|
8120
|
+
fetchId === eventSource.latestFetchId) {
|
|
8121
|
+
return Object.assign(Object.assign({}, sourceHash), { [sourceId]: Object.assign(Object.assign({}, eventSource), { isFetching: false, fetchRange }) });
|
|
8122
|
+
}
|
|
8123
|
+
return sourceHash;
|
|
8124
|
+
}
|
|
8125
|
+
function excludeStaticSources(eventSources, context) {
|
|
8126
|
+
return filterHash(eventSources, (eventSource) => doesSourceNeedRange(eventSource, context));
|
|
8127
|
+
}
|
|
8128
|
+
function parseInitialSources(rawOptions, context) {
|
|
8129
|
+
let refiners = buildEventSourceRefiners(context);
|
|
8130
|
+
let rawSources = [].concat(rawOptions.eventSources || []);
|
|
8131
|
+
let sources = []; // parsed
|
|
8132
|
+
if (rawOptions.initialEvents) {
|
|
8133
|
+
rawSources.unshift(rawOptions.initialEvents);
|
|
8134
|
+
}
|
|
8135
|
+
if (rawOptions.events) {
|
|
8136
|
+
rawSources.unshift(rawOptions.events);
|
|
8137
|
+
}
|
|
8138
|
+
for (let rawSource of rawSources) {
|
|
8139
|
+
let source = parseEventSource(rawSource, context, refiners);
|
|
8140
|
+
if (source) {
|
|
8141
|
+
sources.push(source);
|
|
8142
|
+
}
|
|
8143
|
+
}
|
|
8144
|
+
return sources;
|
|
8145
|
+
}
|
|
8146
|
+
function doesSourceNeedRange(eventSource, context) {
|
|
8147
|
+
let defs = context.pluginHooks.eventSourceDefs;
|
|
8148
|
+
return !defs[eventSource.sourceDefId].ignoreRange;
|
|
8149
|
+
}
|
|
8150
|
+
|
|
8389
8151
|
function reduceDateSelection(currentSelection, action) {
|
|
8390
8152
|
switch (action.type) {
|
|
8391
8153
|
case 'UNSELECT_DATES':
|
|
@@ -8571,6 +8333,257 @@ var FullCalendar = (function (exports) {
|
|
|
8571
8333
|
}
|
|
8572
8334
|
}
|
|
8573
8335
|
|
|
8336
|
+
let eventSourceDef$2 = {
|
|
8337
|
+
ignoreRange: true,
|
|
8338
|
+
parseMeta(refined) {
|
|
8339
|
+
if (Array.isArray(refined.events)) {
|
|
8340
|
+
return refined.events;
|
|
8341
|
+
}
|
|
8342
|
+
return null;
|
|
8343
|
+
},
|
|
8344
|
+
fetch(arg, successCallback) {
|
|
8345
|
+
successCallback({
|
|
8346
|
+
rawEvents: arg.eventSource.meta,
|
|
8347
|
+
});
|
|
8348
|
+
},
|
|
8349
|
+
};
|
|
8350
|
+
const arrayEventSourcePlugin = createPlugin({
|
|
8351
|
+
name: 'array-event-source',
|
|
8352
|
+
eventSourceDefs: [eventSourceDef$2],
|
|
8353
|
+
});
|
|
8354
|
+
|
|
8355
|
+
let eventSourceDef$1 = {
|
|
8356
|
+
parseMeta(refined) {
|
|
8357
|
+
if (typeof refined.events === 'function') {
|
|
8358
|
+
return refined.events;
|
|
8359
|
+
}
|
|
8360
|
+
return null;
|
|
8361
|
+
},
|
|
8362
|
+
fetch(arg, successCallback, errorCallback) {
|
|
8363
|
+
const { dateEnv } = arg.context;
|
|
8364
|
+
const func = arg.eventSource.meta;
|
|
8365
|
+
unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), (rawEvents) => successCallback({ rawEvents }), errorCallback);
|
|
8366
|
+
},
|
|
8367
|
+
};
|
|
8368
|
+
const funcEventSourcePlugin = createPlugin({
|
|
8369
|
+
name: 'func-event-source',
|
|
8370
|
+
eventSourceDefs: [eventSourceDef$1],
|
|
8371
|
+
});
|
|
8372
|
+
|
|
8373
|
+
const JSON_FEED_EVENT_SOURCE_REFINERS = {
|
|
8374
|
+
method: String,
|
|
8375
|
+
extraParams: identity,
|
|
8376
|
+
startParam: String,
|
|
8377
|
+
endParam: String,
|
|
8378
|
+
timeZoneParam: String,
|
|
8379
|
+
};
|
|
8380
|
+
|
|
8381
|
+
let eventSourceDef = {
|
|
8382
|
+
parseMeta(refined) {
|
|
8383
|
+
if (refined.url && (refined.format === 'json' || !refined.format)) {
|
|
8384
|
+
return {
|
|
8385
|
+
url: refined.url,
|
|
8386
|
+
format: 'json',
|
|
8387
|
+
method: (refined.method || 'GET').toUpperCase(),
|
|
8388
|
+
extraParams: refined.extraParams,
|
|
8389
|
+
startParam: refined.startParam,
|
|
8390
|
+
endParam: refined.endParam,
|
|
8391
|
+
timeZoneParam: refined.timeZoneParam,
|
|
8392
|
+
};
|
|
8393
|
+
}
|
|
8394
|
+
return null;
|
|
8395
|
+
},
|
|
8396
|
+
fetch(arg, successCallback, errorCallback) {
|
|
8397
|
+
const { meta } = arg.eventSource;
|
|
8398
|
+
const requestParams = buildRequestParams(meta, arg.range, arg.context);
|
|
8399
|
+
requestJson(meta.method, meta.url, requestParams).then(([rawEvents, response]) => {
|
|
8400
|
+
successCallback({ rawEvents, response });
|
|
8401
|
+
}, errorCallback);
|
|
8402
|
+
},
|
|
8403
|
+
};
|
|
8404
|
+
const jsonFeedEventSourcePlugin = createPlugin({
|
|
8405
|
+
name: 'json-event-source',
|
|
8406
|
+
eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS,
|
|
8407
|
+
eventSourceDefs: [eventSourceDef],
|
|
8408
|
+
});
|
|
8409
|
+
function buildRequestParams(meta, range, context) {
|
|
8410
|
+
let { dateEnv, options } = context;
|
|
8411
|
+
let startParam;
|
|
8412
|
+
let endParam;
|
|
8413
|
+
let timeZoneParam;
|
|
8414
|
+
let customRequestParams;
|
|
8415
|
+
let params = {};
|
|
8416
|
+
startParam = meta.startParam;
|
|
8417
|
+
if (startParam == null) {
|
|
8418
|
+
startParam = options.startParam;
|
|
8419
|
+
}
|
|
8420
|
+
endParam = meta.endParam;
|
|
8421
|
+
if (endParam == null) {
|
|
8422
|
+
endParam = options.endParam;
|
|
8423
|
+
}
|
|
8424
|
+
timeZoneParam = meta.timeZoneParam;
|
|
8425
|
+
if (timeZoneParam == null) {
|
|
8426
|
+
timeZoneParam = options.timeZoneParam;
|
|
8427
|
+
}
|
|
8428
|
+
// retrieve any outbound GET/POST data from the options
|
|
8429
|
+
if (typeof meta.extraParams === 'function') {
|
|
8430
|
+
// supplied as a function that returns a key/value object
|
|
8431
|
+
customRequestParams = meta.extraParams();
|
|
8432
|
+
}
|
|
8433
|
+
else {
|
|
8434
|
+
// probably supplied as a straight key/value object
|
|
8435
|
+
customRequestParams = meta.extraParams || {};
|
|
8436
|
+
}
|
|
8437
|
+
Object.assign(params, customRequestParams);
|
|
8438
|
+
params[startParam] = dateEnv.formatIso(range.start);
|
|
8439
|
+
params[endParam] = dateEnv.formatIso(range.end);
|
|
8440
|
+
if (dateEnv.timeZone !== 'local') {
|
|
8441
|
+
params[timeZoneParam] = dateEnv.timeZone;
|
|
8442
|
+
}
|
|
8443
|
+
return params;
|
|
8444
|
+
}
|
|
8445
|
+
|
|
8446
|
+
const SIMPLE_RECURRING_REFINERS = {
|
|
8447
|
+
daysOfWeek: identity,
|
|
8448
|
+
startTime: createDuration,
|
|
8449
|
+
endTime: createDuration,
|
|
8450
|
+
duration: createDuration,
|
|
8451
|
+
startRecur: identity,
|
|
8452
|
+
endRecur: identity,
|
|
8453
|
+
};
|
|
8454
|
+
|
|
8455
|
+
let recurring = {
|
|
8456
|
+
parse(refined, dateEnv) {
|
|
8457
|
+
if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) {
|
|
8458
|
+
let recurringData = {
|
|
8459
|
+
daysOfWeek: refined.daysOfWeek || null,
|
|
8460
|
+
startTime: refined.startTime || null,
|
|
8461
|
+
endTime: refined.endTime || null,
|
|
8462
|
+
startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null,
|
|
8463
|
+
endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null,
|
|
8464
|
+
};
|
|
8465
|
+
let duration;
|
|
8466
|
+
if (refined.duration) {
|
|
8467
|
+
duration = refined.duration;
|
|
8468
|
+
}
|
|
8469
|
+
if (!duration && refined.startTime && refined.endTime) {
|
|
8470
|
+
duration = subtractDurations(refined.endTime, refined.startTime);
|
|
8471
|
+
}
|
|
8472
|
+
return {
|
|
8473
|
+
allDayGuess: Boolean(!refined.startTime && !refined.endTime),
|
|
8474
|
+
duration,
|
|
8475
|
+
typeData: recurringData, // doesn't need endTime anymore but oh well
|
|
8476
|
+
};
|
|
8477
|
+
}
|
|
8478
|
+
return null;
|
|
8479
|
+
},
|
|
8480
|
+
expand(typeData, framingRange, dateEnv) {
|
|
8481
|
+
let clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });
|
|
8482
|
+
if (clippedFramingRange) {
|
|
8483
|
+
return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv);
|
|
8484
|
+
}
|
|
8485
|
+
return [];
|
|
8486
|
+
},
|
|
8487
|
+
};
|
|
8488
|
+
const simpleRecurringEventsPlugin = createPlugin({
|
|
8489
|
+
name: 'simple-recurring-event',
|
|
8490
|
+
recurringTypes: [recurring],
|
|
8491
|
+
eventRefiners: SIMPLE_RECURRING_REFINERS,
|
|
8492
|
+
});
|
|
8493
|
+
function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
|
|
8494
|
+
let dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;
|
|
8495
|
+
let dayMarker = startOfDay(framingRange.start);
|
|
8496
|
+
let endMarker = framingRange.end;
|
|
8497
|
+
let instanceStarts = [];
|
|
8498
|
+
while (dayMarker < endMarker) {
|
|
8499
|
+
let instanceStart;
|
|
8500
|
+
// if everyday, or this particular day-of-week
|
|
8501
|
+
if (!dowHash || dowHash[dayMarker.getUTCDay()]) {
|
|
8502
|
+
if (startTime) {
|
|
8503
|
+
instanceStart = dateEnv.add(dayMarker, startTime);
|
|
8504
|
+
}
|
|
8505
|
+
else {
|
|
8506
|
+
instanceStart = dayMarker;
|
|
8507
|
+
}
|
|
8508
|
+
instanceStarts.push(instanceStart);
|
|
8509
|
+
}
|
|
8510
|
+
dayMarker = addDays(dayMarker, 1);
|
|
8511
|
+
}
|
|
8512
|
+
return instanceStarts;
|
|
8513
|
+
}
|
|
8514
|
+
|
|
8515
|
+
const changeHandlerPlugin = createPlugin({
|
|
8516
|
+
name: 'change-handler',
|
|
8517
|
+
optionChangeHandlers: {
|
|
8518
|
+
events(events, context) {
|
|
8519
|
+
handleEventSources([events], context);
|
|
8520
|
+
},
|
|
8521
|
+
eventSources: handleEventSources,
|
|
8522
|
+
},
|
|
8523
|
+
});
|
|
8524
|
+
/*
|
|
8525
|
+
BUG: if `event` was supplied, all previously-given `eventSources` will be wiped out
|
|
8526
|
+
*/
|
|
8527
|
+
function handleEventSources(inputs, context) {
|
|
8528
|
+
let unfoundSources = hashValuesToArray(context.getCurrentData().eventSources);
|
|
8529
|
+
let newInputs = [];
|
|
8530
|
+
for (let input of inputs) {
|
|
8531
|
+
let inputFound = false;
|
|
8532
|
+
for (let i = 0; i < unfoundSources.length; i += 1) {
|
|
8533
|
+
if (unfoundSources[i]._raw === input) {
|
|
8534
|
+
unfoundSources.splice(i, 1); // delete
|
|
8535
|
+
inputFound = true;
|
|
8536
|
+
break;
|
|
8537
|
+
}
|
|
8538
|
+
}
|
|
8539
|
+
if (!inputFound) {
|
|
8540
|
+
newInputs.push(input);
|
|
8541
|
+
}
|
|
8542
|
+
}
|
|
8543
|
+
for (let unfoundSource of unfoundSources) {
|
|
8544
|
+
context.dispatch({
|
|
8545
|
+
type: 'REMOVE_EVENT_SOURCE',
|
|
8546
|
+
sourceId: unfoundSource.sourceId,
|
|
8547
|
+
});
|
|
8548
|
+
}
|
|
8549
|
+
for (let newInput of newInputs) {
|
|
8550
|
+
context.calendarApi.addEventSource(newInput);
|
|
8551
|
+
}
|
|
8552
|
+
}
|
|
8553
|
+
|
|
8554
|
+
function handleDateProfile(dateProfile, context) {
|
|
8555
|
+
context.emitter.trigger('datesSet', Object.assign(Object.assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi }));
|
|
8556
|
+
}
|
|
8557
|
+
|
|
8558
|
+
function handleEventStore(eventStore, context) {
|
|
8559
|
+
let { emitter } = context;
|
|
8560
|
+
if (emitter.hasHandlers('eventsSet')) {
|
|
8561
|
+
emitter.trigger('eventsSet', buildEventApis(eventStore, context));
|
|
8562
|
+
}
|
|
8563
|
+
}
|
|
8564
|
+
|
|
8565
|
+
/*
|
|
8566
|
+
this array is exposed on the root namespace so that UMD plugins can add to it.
|
|
8567
|
+
see the rollup-bundles script.
|
|
8568
|
+
*/
|
|
8569
|
+
const globalPlugins = [
|
|
8570
|
+
arrayEventSourcePlugin,
|
|
8571
|
+
funcEventSourcePlugin,
|
|
8572
|
+
jsonFeedEventSourcePlugin,
|
|
8573
|
+
simpleRecurringEventsPlugin,
|
|
8574
|
+
changeHandlerPlugin,
|
|
8575
|
+
createPlugin({
|
|
8576
|
+
name: 'misc',
|
|
8577
|
+
isLoadingFuncs: [
|
|
8578
|
+
(state) => computeEventSourcesLoading(state.eventSources),
|
|
8579
|
+
],
|
|
8580
|
+
propSetHandlers: {
|
|
8581
|
+
dateProfile: handleDateProfile,
|
|
8582
|
+
eventStore: handleEventStore,
|
|
8583
|
+
},
|
|
8584
|
+
}),
|
|
8585
|
+
];
|
|
8586
|
+
|
|
8574
8587
|
class TaskRunner {
|
|
8575
8588
|
constructor(runTaskOption, drainedOption) {
|
|
8576
8589
|
this.runTaskOption = runTaskOption;
|
|
@@ -9589,7 +9602,7 @@ var FullCalendar = (function (exports) {
|
|
|
9589
9602
|
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
9590
9603
|
}
|
|
9591
9604
|
|
|
9592
|
-
const version = '6.0.
|
|
9605
|
+
const version = '6.0.2';
|
|
9593
9606
|
|
|
9594
9607
|
exports.Calendar = Calendar;
|
|
9595
9608
|
exports.Internal = internal;
|
|
@@ -9598,6 +9611,8 @@ var FullCalendar = (function (exports) {
|
|
|
9598
9611
|
exports.createPlugin = createPlugin;
|
|
9599
9612
|
exports.formatDate = formatDate;
|
|
9600
9613
|
exports.formatRange = formatRange;
|
|
9614
|
+
exports.globalLocales = globalLocales;
|
|
9615
|
+
exports.globalPlugins = globalPlugins;
|
|
9601
9616
|
exports.sliceEvents = sliceEvents;
|
|
9602
9617
|
exports.version = version;
|
|
9603
9618
|
|