fullcalendar 7.0.0-beta.0 → 7.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.global.js +480 -357
- package/index.global.min.js +2 -2
- package/package.json +7 -7
package/index.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar Standard Bundle v7.0.0-beta.
|
|
2
|
+
FullCalendar Standard Bundle v7.0.0-beta.1
|
|
3
3
|
Docs & License: https://fullcalendar.io/docs/initialize-globals
|
|
4
4
|
(c) 2024 Adam Shaw
|
|
5
5
|
*/
|
|
@@ -4286,12 +4286,12 @@ var FullCalendar = (function (exports) {
|
|
|
4286
4286
|
function hasBgRendering(def) {
|
|
4287
4287
|
return def.ui.display === 'background' || def.ui.display === 'inverse-background';
|
|
4288
4288
|
}
|
|
4289
|
-
function
|
|
4290
|
-
el.
|
|
4289
|
+
function setElEventRange(el, eventRange) {
|
|
4290
|
+
el.fcEventRange = eventRange;
|
|
4291
4291
|
}
|
|
4292
|
-
function
|
|
4293
|
-
return el.
|
|
4294
|
-
el.parentNode.
|
|
4292
|
+
function getElEventRange(el) {
|
|
4293
|
+
return el.fcEventRange ||
|
|
4294
|
+
el.parentNode.fcEventRange || // for the harness
|
|
4295
4295
|
null;
|
|
4296
4296
|
}
|
|
4297
4297
|
// event ui computation
|
|
@@ -4311,7 +4311,7 @@ var FullCalendar = (function (exports) {
|
|
|
4311
4311
|
}
|
|
4312
4312
|
function sortEventSegs(segs, eventOrderSpecs) {
|
|
4313
4313
|
let objs = segs.map(buildSegCompareObj);
|
|
4314
|
-
objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs));
|
|
4314
|
+
objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs)); // !!!
|
|
4315
4315
|
return objs.map((c) => c._seg);
|
|
4316
4316
|
}
|
|
4317
4317
|
// returns a object with all primitive props that can be compared
|
|
@@ -4324,29 +4324,23 @@ var FullCalendar = (function (exports) {
|
|
|
4324
4324
|
return Object.assign(Object.assign(Object.assign({}, eventDef.extendedProps), eventDef), { id: eventDef.publicId, start,
|
|
4325
4325
|
end, duration: end - start, allDay: Number(eventDef.allDay), _seg: seg });
|
|
4326
4326
|
}
|
|
4327
|
-
function
|
|
4327
|
+
function computeEventRangeDraggable(eventRange, context) {
|
|
4328
4328
|
let { pluginHooks } = context;
|
|
4329
4329
|
let transformers = pluginHooks.isDraggableTransformers;
|
|
4330
|
-
let { def, ui } =
|
|
4330
|
+
let { def, ui } = eventRange;
|
|
4331
4331
|
let val = ui.startEditable;
|
|
4332
4332
|
for (let transformer of transformers) {
|
|
4333
4333
|
val = transformer(val, def, ui, context);
|
|
4334
4334
|
}
|
|
4335
4335
|
return val;
|
|
4336
4336
|
}
|
|
4337
|
-
function
|
|
4338
|
-
return seg.isStart && seg.eventRange.ui.durationEditable && context.options.eventResizableFromStart;
|
|
4339
|
-
}
|
|
4340
|
-
function computeSegEndResizable(seg, context) {
|
|
4341
|
-
return seg.isEnd && seg.eventRange.ui.durationEditable;
|
|
4342
|
-
}
|
|
4343
|
-
function buildSegTimeText(seg, timeFormat, context, defaultDisplayEventTime, // defaults to true
|
|
4337
|
+
function buildEventRangeTimeText(eventRange, timeFormat, context, defaultDisplayEventTime, // defaults to true
|
|
4344
4338
|
defaultDisplayEventEnd, // defaults to true
|
|
4345
4339
|
startOverride, endOverride) {
|
|
4346
4340
|
let { dateEnv, options } = context;
|
|
4347
4341
|
let { displayEventTime, displayEventEnd } = options;
|
|
4348
|
-
let eventDef =
|
|
4349
|
-
let eventInstance =
|
|
4342
|
+
let eventDef = eventRange.def;
|
|
4343
|
+
let eventInstance = eventRange.instance;
|
|
4350
4344
|
if (displayEventTime == null) {
|
|
4351
4345
|
displayEventTime = defaultDisplayEventTime !== false;
|
|
4352
4346
|
}
|
|
@@ -4355,8 +4349,8 @@ var FullCalendar = (function (exports) {
|
|
|
4355
4349
|
}
|
|
4356
4350
|
let wholeEventStart = eventInstance.range.start;
|
|
4357
4351
|
let wholeEventEnd = eventInstance.range.end;
|
|
4358
|
-
let segStart = startOverride ||
|
|
4359
|
-
let segEnd = endOverride ||
|
|
4352
|
+
let segStart = startOverride || eventRange.range.start;
|
|
4353
|
+
let segEnd = endOverride || eventRange.range.end;
|
|
4360
4354
|
let isStartDay = startOfDay(wholeEventStart).valueOf() === startOfDay(segStart).valueOf();
|
|
4361
4355
|
let isEndDay = startOfDay(addMs(wholeEventEnd, -1)).valueOf() === startOfDay(addMs(segEnd, -1)).valueOf();
|
|
4362
4356
|
if (displayEventTime && !eventDef.allDay && (isStartDay || isEndDay)) {
|
|
@@ -4374,8 +4368,8 @@ var FullCalendar = (function (exports) {
|
|
|
4374
4368
|
}
|
|
4375
4369
|
return '';
|
|
4376
4370
|
}
|
|
4377
|
-
function
|
|
4378
|
-
let segRange =
|
|
4371
|
+
function getEventRangeMeta(eventRange, todayRange, nowDate) {
|
|
4372
|
+
let segRange = eventRange.range;
|
|
4379
4373
|
return {
|
|
4380
4374
|
isPast: segRange.end <= (nowDate || todayRange.start),
|
|
4381
4375
|
isFuture: segRange.start >= (nowDate || todayRange.end),
|
|
@@ -4425,8 +4419,8 @@ var FullCalendar = (function (exports) {
|
|
|
4425
4419
|
: `${eventRange.def.defId}:${eventRange.range.start.toISOString()}`;
|
|
4426
4420
|
// inverse-background events don't have specific instances. TODO: better solution
|
|
4427
4421
|
}
|
|
4428
|
-
function
|
|
4429
|
-
let { def, instance } =
|
|
4422
|
+
function getEventRangeAnchorAttrs(eventRange, context) {
|
|
4423
|
+
let { def, instance } = eventRange;
|
|
4430
4424
|
let { url } = def;
|
|
4431
4425
|
if (url) {
|
|
4432
4426
|
return { href: url };
|
|
@@ -6121,6 +6115,99 @@ var FullCalendar = (function (exports) {
|
|
|
6121
6115
|
}
|
|
6122
6116
|
}
|
|
6123
6117
|
|
|
6118
|
+
const WHEEL_EVENT_NAMES = 'wheel mousewheel DomMouseScroll MozMousePixelScroll'.split(' ');
|
|
6119
|
+
/*
|
|
6120
|
+
Fires:
|
|
6121
|
+
- scrollStart (always user)
|
|
6122
|
+
- scroll
|
|
6123
|
+
- scrollEnd (always user)
|
|
6124
|
+
|
|
6125
|
+
NOTE: detection is complicated (w/ touch and wheel) because ScrollerSyncer needs to know about it,
|
|
6126
|
+
but are we sure we can't just ignore programmatic scrollTo() calls with a flag? and determine the
|
|
6127
|
+
the scroll-master simply by who was the newest scroller? Does passive:true do things asynchronously?
|
|
6128
|
+
*/
|
|
6129
|
+
class ScrollListener {
|
|
6130
|
+
constructor(el) {
|
|
6131
|
+
this.el = el;
|
|
6132
|
+
this.emitter = new Emitter();
|
|
6133
|
+
this.isScrolling = false;
|
|
6134
|
+
this.isTouching = false; // user currently has finger down?
|
|
6135
|
+
this.isRecentlyWheeled = false;
|
|
6136
|
+
this.isRecentlyScrolled = false;
|
|
6137
|
+
this.wheelWaiter = new DelayedRunner(this._handleWheelWaited.bind(this));
|
|
6138
|
+
this.scrollWaiter = new DelayedRunner(this._handleScrollWaited.bind(this));
|
|
6139
|
+
// Handlers
|
|
6140
|
+
// ----------------------------------------------------------------------------------------------
|
|
6141
|
+
this.handleScroll = () => {
|
|
6142
|
+
this.startScroll();
|
|
6143
|
+
this.emitter.trigger('scroll', this.isRecentlyWheeled, this.isTouching);
|
|
6144
|
+
this.isRecentlyScrolled = true;
|
|
6145
|
+
this.scrollWaiter.request(500);
|
|
6146
|
+
};
|
|
6147
|
+
// will fire *before* the scroll event is fired (might not cause a scroll)
|
|
6148
|
+
this.handleWheel = () => {
|
|
6149
|
+
this.isRecentlyWheeled = true;
|
|
6150
|
+
this.wheelWaiter.request(500);
|
|
6151
|
+
};
|
|
6152
|
+
// will fire *before* the scroll event is fired (might not cause a scroll)
|
|
6153
|
+
this.handleTouchStart = () => {
|
|
6154
|
+
this.isTouching = true;
|
|
6155
|
+
};
|
|
6156
|
+
this.handleTouchEnd = () => {
|
|
6157
|
+
this.isTouching = false;
|
|
6158
|
+
// if the user ended their touch, and the scroll area wasn't moving,
|
|
6159
|
+
// we consider this to be the end of the scroll.
|
|
6160
|
+
if (!this.isRecentlyScrolled) {
|
|
6161
|
+
this.endScroll(); // won't fire if already ended
|
|
6162
|
+
}
|
|
6163
|
+
};
|
|
6164
|
+
el.addEventListener('scroll', this.handleScroll);
|
|
6165
|
+
el.addEventListener('touchstart', this.handleTouchStart, { passive: true });
|
|
6166
|
+
el.addEventListener('touchend', this.handleTouchEnd);
|
|
6167
|
+
for (let eventName of WHEEL_EVENT_NAMES) {
|
|
6168
|
+
el.addEventListener(eventName, this.handleWheel, { passive: true });
|
|
6169
|
+
}
|
|
6170
|
+
}
|
|
6171
|
+
destroy() {
|
|
6172
|
+
let { el } = this;
|
|
6173
|
+
el.removeEventListener('scroll', this.handleScroll);
|
|
6174
|
+
el.removeEventListener('touchstart', this.handleTouchStart, { passive: true });
|
|
6175
|
+
el.removeEventListener('touchend', this.handleTouchEnd);
|
|
6176
|
+
for (let eventName of WHEEL_EVENT_NAMES) {
|
|
6177
|
+
el.removeEventListener(eventName, this.handleWheel, { passive: true });
|
|
6178
|
+
}
|
|
6179
|
+
}
|
|
6180
|
+
// Start / Stop
|
|
6181
|
+
// ----------------------------------------------------------------------------------------------
|
|
6182
|
+
startScroll() {
|
|
6183
|
+
if (!this.isScrolling) {
|
|
6184
|
+
this.isScrolling = true;
|
|
6185
|
+
this.emitter.trigger('scrollStart', this.isRecentlyWheeled, this.isTouching);
|
|
6186
|
+
}
|
|
6187
|
+
}
|
|
6188
|
+
endScroll() {
|
|
6189
|
+
if (this.isScrolling) {
|
|
6190
|
+
this.emitter.trigger('scrollEnd');
|
|
6191
|
+
this.isScrolling = false;
|
|
6192
|
+
this.isRecentlyScrolled = true;
|
|
6193
|
+
this.isRecentlyWheeled = false;
|
|
6194
|
+
this.scrollWaiter.clear();
|
|
6195
|
+
this.wheelWaiter.clear();
|
|
6196
|
+
}
|
|
6197
|
+
}
|
|
6198
|
+
_handleScrollWaited() {
|
|
6199
|
+
this.isRecentlyScrolled = false;
|
|
6200
|
+
// only end the scroll if not currently touching.
|
|
6201
|
+
// if touching, the scrolling will end later, on touchend.
|
|
6202
|
+
if (!this.isTouching) {
|
|
6203
|
+
this.endScroll(); // won't fire if already ended
|
|
6204
|
+
}
|
|
6205
|
+
}
|
|
6206
|
+
_handleWheelWaited() {
|
|
6207
|
+
this.isRecentlyWheeled = false;
|
|
6208
|
+
}
|
|
6209
|
+
}
|
|
6210
|
+
|
|
6124
6211
|
class Scroller extends DateComponent {
|
|
6125
6212
|
constructor() {
|
|
6126
6213
|
super(...arguments);
|
|
@@ -6140,6 +6227,7 @@ var FullCalendar = (function (exports) {
|
|
|
6140
6227
|
}
|
|
6141
6228
|
componentDidMount() {
|
|
6142
6229
|
const el = this.elRef.current; // TODO: make dynamic with useEffect
|
|
6230
|
+
this.listener = new ScrollListener(el);
|
|
6143
6231
|
this.disconnectSize = watchSize(el, (contentWidth, contentHeight) => {
|
|
6144
6232
|
const { props, context } = this;
|
|
6145
6233
|
const bottomScrollbarWidth = el.offsetHeight - el.clientHeight;
|
|
@@ -6170,13 +6258,20 @@ var FullCalendar = (function (exports) {
|
|
|
6170
6258
|
});
|
|
6171
6259
|
}
|
|
6172
6260
|
componentWillUnmount() {
|
|
6261
|
+
const { props } = this;
|
|
6173
6262
|
this.disconnectSize();
|
|
6263
|
+
this.listener.destroy();
|
|
6264
|
+
setRef(props.widthRef, null);
|
|
6265
|
+
setRef(props.heightRef, null);
|
|
6266
|
+
setRef(props.bottomScrollbarWidthRef, null);
|
|
6267
|
+
setRef(props.rightScrollbarWidthRef, null);
|
|
6268
|
+
setRef(props.leftScrollbarWidthRef, null);
|
|
6269
|
+
}
|
|
6270
|
+
endScroll() {
|
|
6271
|
+
this.listener.endScroll();
|
|
6174
6272
|
}
|
|
6175
6273
|
// Public API
|
|
6176
6274
|
// -----------------------------------------------------------------------------------------------
|
|
6177
|
-
get el() {
|
|
6178
|
-
return this.elRef.current;
|
|
6179
|
-
}
|
|
6180
6275
|
get x() {
|
|
6181
6276
|
const { isRtl } = this.context;
|
|
6182
6277
|
const el = this.elRef.current;
|
|
@@ -6196,6 +6291,12 @@ var FullCalendar = (function (exports) {
|
|
|
6196
6291
|
setNormalizedScrollX(el, isRtl, x);
|
|
6197
6292
|
}
|
|
6198
6293
|
}
|
|
6294
|
+
addScrollEndListener(handler) {
|
|
6295
|
+
this.listener.emitter.on('scrollEnd', handler);
|
|
6296
|
+
}
|
|
6297
|
+
removeScrollEndListener(handler) {
|
|
6298
|
+
this.listener.emitter.off('scrollEnd', handler);
|
|
6299
|
+
}
|
|
6199
6300
|
}
|
|
6200
6301
|
// Public API
|
|
6201
6302
|
// -------------------------------------------------------------------------------------------------
|
|
@@ -6690,38 +6791,20 @@ var FullCalendar = (function (exports) {
|
|
|
6690
6791
|
return { start, end };
|
|
6691
6792
|
}
|
|
6692
6793
|
|
|
6693
|
-
class ScrollResponder {
|
|
6694
|
-
constructor(_handleScroll) {
|
|
6695
|
-
this._handleScroll = _handleScroll;
|
|
6696
|
-
this.handleScroll = (scroll) => {
|
|
6697
|
-
this.queuedScroll = scroll;
|
|
6698
|
-
this.drain();
|
|
6699
|
-
};
|
|
6700
|
-
}
|
|
6701
|
-
drain() {
|
|
6702
|
-
if (this.queuedScroll) {
|
|
6703
|
-
if (this._handleScroll(this.queuedScroll)) {
|
|
6704
|
-
this.queuedScroll = undefined;
|
|
6705
|
-
}
|
|
6706
|
-
}
|
|
6707
|
-
}
|
|
6708
|
-
}
|
|
6709
|
-
|
|
6710
6794
|
class EventContainer extends BaseComponent {
|
|
6711
6795
|
constructor() {
|
|
6712
6796
|
super(...arguments);
|
|
6713
6797
|
this.handleEl = (el) => {
|
|
6714
6798
|
this.el = el;
|
|
6715
6799
|
if (el) {
|
|
6716
|
-
|
|
6800
|
+
setElEventRange(el, this.props.eventRange);
|
|
6717
6801
|
}
|
|
6718
6802
|
};
|
|
6719
6803
|
}
|
|
6720
6804
|
render() {
|
|
6721
6805
|
const { props, context } = this;
|
|
6722
6806
|
const { options } = context;
|
|
6723
|
-
const {
|
|
6724
|
-
const { eventRange } = seg;
|
|
6807
|
+
const { eventRange } = props;
|
|
6725
6808
|
const { ui } = eventRange;
|
|
6726
6809
|
const renderProps = {
|
|
6727
6810
|
event: new EventImpl(context, eventRange.def, eventRange.instance),
|
|
@@ -6730,12 +6813,12 @@ var FullCalendar = (function (exports) {
|
|
|
6730
6813
|
textColor: ui.textColor,
|
|
6731
6814
|
backgroundColor: ui.backgroundColor,
|
|
6732
6815
|
borderColor: ui.borderColor,
|
|
6733
|
-
isDraggable: !props.disableDragging &&
|
|
6734
|
-
isStartResizable: !props.disableResizing &&
|
|
6735
|
-
isEndResizable: !props.disableResizing &&
|
|
6816
|
+
isDraggable: !props.disableDragging && computeEventRangeDraggable(eventRange, context),
|
|
6817
|
+
isStartResizable: !props.disableResizing && props.isStart && eventRange.ui.durationEditable && options.eventResizableFromStart,
|
|
6818
|
+
isEndResizable: !props.disableResizing && props.isEnd && eventRange.ui.durationEditable,
|
|
6736
6819
|
isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
|
|
6737
|
-
isStart: Boolean(
|
|
6738
|
-
isEnd: Boolean(
|
|
6820
|
+
isStart: Boolean(props.isStart),
|
|
6821
|
+
isEnd: Boolean(props.isEnd),
|
|
6739
6822
|
isPast: Boolean(props.isPast),
|
|
6740
6823
|
isFuture: Boolean(props.isFuture),
|
|
6741
6824
|
isToday: Boolean(props.isToday),
|
|
@@ -6745,13 +6828,13 @@ var FullCalendar = (function (exports) {
|
|
|
6745
6828
|
};
|
|
6746
6829
|
return (_(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
|
|
6747
6830
|
...getEventClassNames(renderProps),
|
|
6748
|
-
...
|
|
6831
|
+
...eventRange.ui.classNames,
|
|
6749
6832
|
...(props.elClasses || []),
|
|
6750
6833
|
], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
|
|
6751
6834
|
}
|
|
6752
6835
|
componentDidUpdate(prevProps) {
|
|
6753
|
-
if (this.el && this.props.
|
|
6754
|
-
|
|
6836
|
+
if (this.el && this.props.eventRange !== prevProps.eventRange) {
|
|
6837
|
+
setElEventRange(this.el, this.props.eventRange);
|
|
6755
6838
|
}
|
|
6756
6839
|
}
|
|
6757
6840
|
}
|
|
@@ -6761,14 +6844,14 @@ var FullCalendar = (function (exports) {
|
|
|
6761
6844
|
render() {
|
|
6762
6845
|
let { props, context } = this;
|
|
6763
6846
|
let { options } = context;
|
|
6764
|
-
let {
|
|
6765
|
-
let { ui } =
|
|
6847
|
+
let { eventRange } = props;
|
|
6848
|
+
let { ui } = eventRange;
|
|
6766
6849
|
let timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
|
|
6767
|
-
let timeText =
|
|
6850
|
+
let timeText = buildEventRangeTimeText(eventRange, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd, props.startOverride, props.endOverride);
|
|
6768
6851
|
return (_(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: {
|
|
6769
6852
|
borderColor: ui.borderColor,
|
|
6770
6853
|
backgroundColor: ui.backgroundColor,
|
|
6771
|
-
}, elAttrs:
|
|
6854
|
+
}, elAttrs: getEventRangeAnchorAttrs(eventRange, context), defaultGenerator: renderInnerContent$1$1, timeText: timeText }), (InnerContent, eventContentArg) => (_(k$1, null,
|
|
6772
6855
|
_(InnerContent, { elTag: "div", elClasses: ['fc-event-inner'], elStyle: { color: eventContentArg.textColor } }),
|
|
6773
6856
|
Boolean(eventContentArg.isStartResizable) && (_("div", { className: "fc-event-resizer fc-event-resizer-start" })),
|
|
6774
6857
|
Boolean(eventContentArg.isEndResizable) && (_("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
|
|
@@ -6794,8 +6877,8 @@ var FullCalendar = (function (exports) {
|
|
|
6794
6877
|
class BgEvent extends BaseComponent {
|
|
6795
6878
|
render() {
|
|
6796
6879
|
let { props } = this;
|
|
6797
|
-
let {
|
|
6798
|
-
return (_(EventContainer, { elTag: "div", elClasses: ['fc-bg-event'], elStyle: { backgroundColor:
|
|
6880
|
+
let { eventRange } = props;
|
|
6881
|
+
return (_(EventContainer, { elTag: "div", elClasses: ['fc-bg-event'], elStyle: { backgroundColor: eventRange.ui.backgroundColor }, defaultGenerator: renderInnerContent$3, eventRange: eventRange, isStart: props.isStart, isEnd: props.isEnd, timeText: "", isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, disableDragging: true, disableResizing: true }));
|
|
6799
6882
|
}
|
|
6800
6883
|
}
|
|
6801
6884
|
function renderInnerContent$3(props) {
|
|
@@ -7272,7 +7355,6 @@ var FullCalendar = (function (exports) {
|
|
|
7272
7355
|
PositionCache: PositionCache,
|
|
7273
7356
|
RefMap: RefMap,
|
|
7274
7357
|
ScrollController: ScrollController,
|
|
7275
|
-
ScrollResponder: ScrollResponder,
|
|
7276
7358
|
Scroller: Scroller,
|
|
7277
7359
|
SegHierarchy: SegHierarchy,
|
|
7278
7360
|
Slicer: Slicer,
|
|
@@ -7301,9 +7383,9 @@ var FullCalendar = (function (exports) {
|
|
|
7301
7383
|
buildEntryKey: buildEntryKey,
|
|
7302
7384
|
buildEventApis: buildEventApis,
|
|
7303
7385
|
buildEventRangeKey: buildEventRangeKey,
|
|
7386
|
+
buildEventRangeTimeText: buildEventRangeTimeText,
|
|
7304
7387
|
buildIsoString: buildIsoString,
|
|
7305
7388
|
buildNavLinkAttrs: buildNavLinkAttrs,
|
|
7306
|
-
buildSegTimeText: buildSegTimeText,
|
|
7307
7389
|
collectFromHash: collectFromHash,
|
|
7308
7390
|
combineEventUis: combineEventUis,
|
|
7309
7391
|
compareByFieldSpecs: compareByFieldSpecs,
|
|
@@ -7345,8 +7427,10 @@ var FullCalendar = (function (exports) {
|
|
|
7345
7427
|
getDateMeta: getDateMeta,
|
|
7346
7428
|
getDayClassNames: getDayClassNames,
|
|
7347
7429
|
getDefaultEventEnd: getDefaultEventEnd,
|
|
7348
|
-
|
|
7430
|
+
getElEventRange: getElEventRange,
|
|
7349
7431
|
getEntrySpanEnd: getEntrySpanEnd,
|
|
7432
|
+
getEventRangeAnchorAttrs: getEventRangeAnchorAttrs,
|
|
7433
|
+
getEventRangeMeta: getEventRangeMeta,
|
|
7350
7434
|
getEventTargetViaRoot: getEventTargetViaRoot,
|
|
7351
7435
|
getIsHeightAuto: getIsHeightAuto,
|
|
7352
7436
|
getIsRtlScrollbarOnLeft: getIsRtlScrollbarOnLeft,
|
|
@@ -7355,8 +7439,6 @@ var FullCalendar = (function (exports) {
|
|
|
7355
7439
|
getRelevantEvents: getRelevantEvents,
|
|
7356
7440
|
getScrollbarWidths: getScrollbarWidths,
|
|
7357
7441
|
getScrollerSyncerClass: getScrollerSyncerClass,
|
|
7358
|
-
getSegAnchorAttrs: getSegAnchorAttrs,
|
|
7359
|
-
getSegMeta: getSegMeta,
|
|
7360
7442
|
getSlotClassNames: getSlotClassNames,
|
|
7361
7443
|
getStickyFooterScrollbar: getStickyFooterScrollbar,
|
|
7362
7444
|
getStickyHeaderDates: getStickyHeaderDates,
|
|
@@ -9148,8 +9230,8 @@ var FullCalendar = (function (exports) {
|
|
|
9148
9230
|
this.handleSegClick = (ev, segEl) => {
|
|
9149
9231
|
let { component } = this;
|
|
9150
9232
|
let { context } = component;
|
|
9151
|
-
let
|
|
9152
|
-
if (
|
|
9233
|
+
let eventRange = getElEventRange(segEl);
|
|
9234
|
+
if (eventRange && // might be the <div> surrounding the more link
|
|
9153
9235
|
component.isValidSegDownEl(ev.target)) {
|
|
9154
9236
|
// our way to simulate a link click for elements that can't be <a> tags
|
|
9155
9237
|
// grab before trigger fired in case trigger trashes DOM thru rerendering
|
|
@@ -9157,7 +9239,7 @@ var FullCalendar = (function (exports) {
|
|
|
9157
9239
|
let url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';
|
|
9158
9240
|
context.emitter.trigger('eventClick', {
|
|
9159
9241
|
el: segEl,
|
|
9160
|
-
event: new EventImpl(component.context,
|
|
9242
|
+
event: new EventImpl(component.context, eventRange.def, eventRange.instance),
|
|
9161
9243
|
jsEvent: ev,
|
|
9162
9244
|
view: context.viewApi,
|
|
9163
9245
|
});
|
|
@@ -9185,7 +9267,7 @@ var FullCalendar = (function (exports) {
|
|
|
9185
9267
|
}
|
|
9186
9268
|
};
|
|
9187
9269
|
this.handleSegEnter = (ev, segEl) => {
|
|
9188
|
-
if (
|
|
9270
|
+
if (getElEventRange(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
|
|
9189
9271
|
this.currentSegEl = segEl;
|
|
9190
9272
|
this.triggerEvent('eventMouseEnter', ev, segEl);
|
|
9191
9273
|
}
|
|
@@ -9205,11 +9287,11 @@ var FullCalendar = (function (exports) {
|
|
|
9205
9287
|
triggerEvent(publicEvName, ev, segEl) {
|
|
9206
9288
|
let { component } = this;
|
|
9207
9289
|
let { context } = component;
|
|
9208
|
-
let
|
|
9290
|
+
let eventRange = getElEventRange(segEl);
|
|
9209
9291
|
if (!ev || component.isValidSegDownEl(ev.target)) {
|
|
9210
9292
|
context.emitter.trigger(publicEvName, {
|
|
9211
9293
|
el: segEl,
|
|
9212
|
-
event: new EventImpl(context,
|
|
9294
|
+
event: new EventImpl(context, eventRange.def, eventRange.instance),
|
|
9213
9295
|
jsEvent: ev,
|
|
9214
9296
|
view: context.viewApi,
|
|
9215
9297
|
});
|
|
@@ -9517,7 +9599,7 @@ var FullCalendar = (function (exports) {
|
|
|
9517
9599
|
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
9518
9600
|
}
|
|
9519
9601
|
|
|
9520
|
-
const version = '7.0.0-beta.
|
|
9602
|
+
const version = '7.0.0-beta.1';
|
|
9521
9603
|
|
|
9522
9604
|
config.touchMouseIgnoreWait = 500;
|
|
9523
9605
|
let ignoreMouseDepth = 0;
|
|
@@ -10746,7 +10828,6 @@ var FullCalendar = (function (exports) {
|
|
|
10746
10828
|
super(settings);
|
|
10747
10829
|
// internal state
|
|
10748
10830
|
this.subjectEl = null;
|
|
10749
|
-
this.subjectSeg = null; // the seg being selected/dragged
|
|
10750
10831
|
this.isDragging = false;
|
|
10751
10832
|
this.eventRange = null;
|
|
10752
10833
|
this.relevantEvents = null; // the events being dragged
|
|
@@ -10760,8 +10841,7 @@ var FullCalendar = (function (exports) {
|
|
|
10760
10841
|
let { options } = component.context;
|
|
10761
10842
|
let initialContext = component.context;
|
|
10762
10843
|
this.subjectEl = ev.subjectEl;
|
|
10763
|
-
let
|
|
10764
|
-
let eventRange = this.eventRange = subjectSeg.eventRange;
|
|
10844
|
+
let eventRange = this.eventRange = getElEventRange(ev.subjectEl);
|
|
10765
10845
|
let eventInstanceId = eventRange.instance.instanceId;
|
|
10766
10846
|
this.relevantEvents = getRelevantEvents(initialContext.getCurrentData().eventStore, eventInstanceId);
|
|
10767
10847
|
dragging.minDistance = ev.isTouch ? 0 : options.eventDragMinDistance;
|
|
@@ -11026,7 +11106,6 @@ var FullCalendar = (function (exports) {
|
|
|
11026
11106
|
}
|
|
11027
11107
|
}
|
|
11028
11108
|
cleanup() {
|
|
11029
|
-
this.subjectSeg = null;
|
|
11030
11109
|
this.isDragging = false;
|
|
11031
11110
|
this.eventRange = null;
|
|
11032
11111
|
this.relevantEvents = null;
|
|
@@ -11087,7 +11166,7 @@ var FullCalendar = (function (exports) {
|
|
|
11087
11166
|
super(settings);
|
|
11088
11167
|
// internal state
|
|
11089
11168
|
this.draggingSegEl = null;
|
|
11090
|
-
this.
|
|
11169
|
+
this.draggingEventRange = null; // TODO: rename to resizingSeg? subjectSeg?
|
|
11091
11170
|
this.eventRange = null;
|
|
11092
11171
|
this.relevantEvents = null;
|
|
11093
11172
|
this.validMutation = null;
|
|
@@ -11095,8 +11174,7 @@ var FullCalendar = (function (exports) {
|
|
|
11095
11174
|
this.handlePointerDown = (ev) => {
|
|
11096
11175
|
let { component } = this;
|
|
11097
11176
|
let segEl = this.querySegEl(ev);
|
|
11098
|
-
let
|
|
11099
|
-
let eventRange = this.eventRange = seg.eventRange;
|
|
11177
|
+
let eventRange = this.eventRange = getElEventRange(segEl);
|
|
11100
11178
|
this.dragging.minDistance = component.context.options.eventDragMinDistance;
|
|
11101
11179
|
// if touch, need to be working with a selected event
|
|
11102
11180
|
this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(ev.origEvent.target) ||
|
|
@@ -11108,7 +11186,7 @@ var FullCalendar = (function (exports) {
|
|
|
11108
11186
|
this.relevantEvents = getRelevantEvents(context.getCurrentData().eventStore, this.eventRange.instance.instanceId);
|
|
11109
11187
|
let segEl = this.querySegEl(ev);
|
|
11110
11188
|
this.draggingSegEl = segEl;
|
|
11111
|
-
this.
|
|
11189
|
+
this.draggingEventRange = getElEventRange(segEl);
|
|
11112
11190
|
context.calendarApi.unselect();
|
|
11113
11191
|
context.emitter.trigger('eventResizeStart', {
|
|
11114
11192
|
el: segEl,
|
|
@@ -11208,7 +11286,7 @@ var FullCalendar = (function (exports) {
|
|
|
11208
11286
|
context.emitter.trigger('_noEventResize');
|
|
11209
11287
|
}
|
|
11210
11288
|
// reset all internal state
|
|
11211
|
-
this.
|
|
11289
|
+
this.draggingEventRange = null;
|
|
11212
11290
|
this.relevantEvents = null;
|
|
11213
11291
|
this.validMutation = null;
|
|
11214
11292
|
// okay to keep eventInstance around. useful to set it in handlePointerDown
|
|
@@ -11718,7 +11796,7 @@ var FullCalendar = (function (exports) {
|
|
|
11718
11796
|
}
|
|
11719
11797
|
// Positioning
|
|
11720
11798
|
// -------------------------------------------------------------------------------------------------
|
|
11721
|
-
function computeTopFromDate(date, cellRows, rowHeightMap) {
|
|
11799
|
+
function computeTopFromDate(date, cellRows, rowHeightMap, adjust = 0) {
|
|
11722
11800
|
let top = 0;
|
|
11723
11801
|
for (const cells of cellRows) {
|
|
11724
11802
|
const start = cells[0].date;
|
|
@@ -11731,7 +11809,7 @@ var FullCalendar = (function (exports) {
|
|
|
11731
11809
|
if (rowHeight == null) {
|
|
11732
11810
|
return; // denote unknown
|
|
11733
11811
|
}
|
|
11734
|
-
top += rowHeight;
|
|
11812
|
+
top += rowHeight + adjust;
|
|
11735
11813
|
}
|
|
11736
11814
|
return top;
|
|
11737
11815
|
}
|
|
@@ -11837,6 +11915,7 @@ var FullCalendar = (function (exports) {
|
|
|
11837
11915
|
}
|
|
11838
11916
|
componentWillUnmount() {
|
|
11839
11917
|
this.disconectInnerHeight();
|
|
11918
|
+
setRef(this.props.innerHeightRef, null);
|
|
11840
11919
|
}
|
|
11841
11920
|
}
|
|
11842
11921
|
|
|
@@ -11906,7 +11985,7 @@ var FullCalendar = (function (exports) {
|
|
|
11906
11985
|
class DayGridBlockEvent extends BaseComponent {
|
|
11907
11986
|
render() {
|
|
11908
11987
|
let { props } = this;
|
|
11909
|
-
return (_(StandardEvent, Object.assign({}, props, { elClasses: ['fc-daygrid-event', 'fc-daygrid-block-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: props.defaultDisplayEventEnd, disableResizing: !props.
|
|
11988
|
+
return (_(StandardEvent, Object.assign({}, props, { elClasses: ['fc-daygrid-event', 'fc-daygrid-block-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: props.defaultDisplayEventEnd, disableResizing: !props.eventRange.def.allDay })));
|
|
11910
11989
|
}
|
|
11911
11990
|
}
|
|
11912
11991
|
|
|
@@ -11914,10 +11993,10 @@ var FullCalendar = (function (exports) {
|
|
|
11914
11993
|
render() {
|
|
11915
11994
|
let { props, context } = this;
|
|
11916
11995
|
let { options } = context;
|
|
11917
|
-
let {
|
|
11996
|
+
let { eventRange } = props;
|
|
11918
11997
|
let timeFormat = options.eventTimeFormat || DEFAULT_TABLE_EVENT_TIME_FORMAT;
|
|
11919
|
-
let timeText =
|
|
11920
|
-
return (_(EventContainer, Object.assign({}, props, { elTag: "a", elClasses: ['fc-daygrid-event', 'fc-daygrid-dot-event'], elAttrs:
|
|
11998
|
+
let timeText = buildEventRangeTimeText(eventRange, timeFormat, context, true, props.defaultDisplayEventEnd);
|
|
11999
|
+
return (_(EventContainer, Object.assign({}, props, { elTag: "a", elClasses: ['fc-daygrid-event', 'fc-daygrid-dot-event'], elAttrs: getEventRangeAnchorAttrs(eventRange, context), defaultGenerator: renderInnerContent$2, timeText: timeText, isResizing: false, isDateSelecting: false })));
|
|
11921
12000
|
}
|
|
11922
12001
|
}
|
|
11923
12002
|
function renderInnerContent$2(renderProps) {
|
|
@@ -11936,10 +12015,11 @@ var FullCalendar = (function (exports) {
|
|
|
11936
12015
|
(props.eventResize ? props.eventResize.affectedInstances : null) ||
|
|
11937
12016
|
{};
|
|
11938
12017
|
return (_(k$1, null, props.segs.map((seg) => {
|
|
11939
|
-
let
|
|
12018
|
+
let { eventRange } = seg;
|
|
12019
|
+
let instanceId = eventRange.instance.instanceId;
|
|
11940
12020
|
return (_("div", { key: instanceId, style: {
|
|
11941
12021
|
visibility: forcedInvisibleMap[instanceId] ? 'hidden' : '',
|
|
11942
|
-
} }, hasListItemDisplay(seg) ? (_(DayGridListEvent, Object.assign({ seg: seg, isDragging: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false },
|
|
12022
|
+
} }, hasListItemDisplay(seg) ? (_(DayGridListEvent, Object.assign({ eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, getEventRangeMeta(eventRange, props.todayRange)))) : (_(DayGridBlockEvent, Object.assign({ eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, getEventRangeMeta(eventRange, props.todayRange))))));
|
|
11943
12023
|
})));
|
|
11944
12024
|
} }));
|
|
11945
12025
|
}
|
|
@@ -12158,6 +12238,7 @@ var FullCalendar = (function (exports) {
|
|
|
12158
12238
|
}
|
|
12159
12239
|
componentWillUnmount() {
|
|
12160
12240
|
this.detachHeight();
|
|
12241
|
+
setRef(this.props.heightRef, null);
|
|
12161
12242
|
}
|
|
12162
12243
|
}
|
|
12163
12244
|
|
|
@@ -12280,7 +12361,8 @@ var FullCalendar = (function (exports) {
|
|
|
12280
12361
|
for (const seg of segs) {
|
|
12281
12362
|
const { left, right, width } = computeHorizontalsFromSeg(seg, colWidth, colCnt, isRtl);
|
|
12282
12363
|
// TODO: optimize ID creation? all related
|
|
12283
|
-
const {
|
|
12364
|
+
const { eventRange } = seg;
|
|
12365
|
+
const { instanceId } = eventRange.instance;
|
|
12284
12366
|
const segSpanId = getSegSpanId(seg);
|
|
12285
12367
|
const segStartId = getSegStartId(seg);
|
|
12286
12368
|
const top = segTops[segStartId];
|
|
@@ -12300,7 +12382,7 @@ var FullCalendar = (function (exports) {
|
|
|
12300
12382
|
width,
|
|
12301
12383
|
}, heightRef: (isMirror || seg.isStandin)
|
|
12302
12384
|
? null
|
|
12303
|
-
: segHeightRefMap.createRef(segSpanId) }, hasListItemDisplay(seg) ? (_(DayGridListEvent, Object.assign({ seg: seg, isDragging: isDragging, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd },
|
|
12385
|
+
: segHeightRefMap.createRef(segSpanId) }, hasListItemDisplay(seg) ? (_(DayGridListEvent, Object.assign({ eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, getEventRangeMeta(eventRange, todayRange)))) : (_(DayGridBlockEvent, Object.assign({ eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, getEventRangeMeta(eventRange, todayRange))))));
|
|
12304
12386
|
}
|
|
12305
12387
|
return nodes;
|
|
12306
12388
|
}
|
|
@@ -12319,8 +12401,7 @@ var FullCalendar = (function (exports) {
|
|
|
12319
12401
|
right,
|
|
12320
12402
|
width,
|
|
12321
12403
|
} }, fillType === 'bg-event' ?
|
|
12322
|
-
_(BgEvent, Object.assign({ seg: seg },
|
|
12323
|
-
renderFill(fillType)));
|
|
12404
|
+
_(BgEvent, Object.assign({ eventRange: seg.eventRange, isStart: seg.isStart, isEnd: seg.isEnd }, getEventRangeMeta(seg.eventRange, todayRange))) : (renderFill(fillType))));
|
|
12324
12405
|
}
|
|
12325
12406
|
return _(k$1, {}, ...nodes);
|
|
12326
12407
|
}
|
|
@@ -12418,12 +12499,12 @@ var FullCalendar = (function (exports) {
|
|
|
12418
12499
|
heightRef: rowHeightRefMap.createRef(cells[0].key) })))));
|
|
12419
12500
|
}
|
|
12420
12501
|
componentDidMount() {
|
|
12421
|
-
this.
|
|
12502
|
+
this.detachWidth = watchWidth(this.rootEl, (width) => {
|
|
12422
12503
|
this.setState({ width });
|
|
12423
12504
|
});
|
|
12424
12505
|
}
|
|
12425
12506
|
componentWillUnmount() {
|
|
12426
|
-
this.
|
|
12507
|
+
this.detachWidth();
|
|
12427
12508
|
}
|
|
12428
12509
|
// Hit System
|
|
12429
12510
|
// -----------------------------------------------------------------------------------------------
|
|
@@ -12601,12 +12682,11 @@ var FullCalendar = (function (exports) {
|
|
|
12601
12682
|
// Scrolling
|
|
12602
12683
|
// -----------------------------------------------------------------------------------------------
|
|
12603
12684
|
updateSyncedScroller() {
|
|
12604
|
-
const { isRtl } = this.context;
|
|
12605
12685
|
this.syncedScroller.handleChildren([
|
|
12606
12686
|
this.headerScrollerRef.current,
|
|
12607
12687
|
this.bodyScrollerRef.current,
|
|
12608
12688
|
this.footerScrollerRef.current,
|
|
12609
|
-
]
|
|
12689
|
+
]);
|
|
12610
12690
|
}
|
|
12611
12691
|
}
|
|
12612
12692
|
|
|
@@ -12615,20 +12695,29 @@ var FullCalendar = (function (exports) {
|
|
|
12615
12695
|
super(...arguments);
|
|
12616
12696
|
// ref
|
|
12617
12697
|
this.scrollerRef = m$1();
|
|
12618
|
-
this.rowHeightRefMap = new RefMap()
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12698
|
+
this.rowHeightRefMap = new RefMap(() => {
|
|
12699
|
+
afterSize(this.updateScrollY);
|
|
12700
|
+
});
|
|
12701
|
+
// internal
|
|
12702
|
+
this.scrollDate = null;
|
|
12703
|
+
this.updateScrollY = () => {
|
|
12623
12704
|
const rowHeightMap = this.rowHeightRefMap.current;
|
|
12624
12705
|
const scroller = this.scrollerRef.current;
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12706
|
+
// Since updateScrollY is called by rowHeightRefMap, could be called with null during cleanup,
|
|
12707
|
+
// and the scroller might not exist
|
|
12708
|
+
if (scroller && this.scrollDate) {
|
|
12709
|
+
let scrollTop = computeTopFromDate(this.scrollDate, this.props.cellRows, rowHeightMap, 1);
|
|
12710
|
+
if (scrollTop != null) {
|
|
12711
|
+
if (scrollTop) {
|
|
12712
|
+
scrollTop++; // clear top border
|
|
12713
|
+
}
|
|
12714
|
+
scroller.scrollTo({ y: scrollTop });
|
|
12715
|
+
}
|
|
12629
12716
|
}
|
|
12630
|
-
|
|
12631
|
-
|
|
12717
|
+
};
|
|
12718
|
+
this.clearScroll = () => {
|
|
12719
|
+
this.scrollDate = null;
|
|
12720
|
+
};
|
|
12632
12721
|
}
|
|
12633
12722
|
render() {
|
|
12634
12723
|
const { props, context } = this;
|
|
@@ -12639,22 +12728,25 @@ var FullCalendar = (function (exports) {
|
|
|
12639
12728
|
// Lifecycle
|
|
12640
12729
|
// -----------------------------------------------------------------------------------------------
|
|
12641
12730
|
componentDidMount() {
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
context.emitter.on('_timeScrollRequest', this.timeScrollResponder.handleScroll);
|
|
12645
|
-
this.timeScrollResponder.handleScroll(options.scrollTime);
|
|
12731
|
+
this.resetScroll();
|
|
12732
|
+
this.scrollerRef.current.addScrollEndListener(this.clearScroll);
|
|
12646
12733
|
}
|
|
12647
12734
|
componentDidUpdate(prevProps) {
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
this.timeScrollResponder.handleScroll(options.scrollTime);
|
|
12651
|
-
}
|
|
12652
|
-
else {
|
|
12653
|
-
this.timeScrollResponder.drain();
|
|
12735
|
+
if (prevProps.dateProfile !== this.props.dateProfile && this.context.options.scrollTimeReset) {
|
|
12736
|
+
this.resetScroll();
|
|
12654
12737
|
}
|
|
12655
12738
|
}
|
|
12656
12739
|
componentWillUnmount() {
|
|
12657
|
-
this.
|
|
12740
|
+
this.scrollerRef.current.removeScrollEndListener(this.clearScroll);
|
|
12741
|
+
}
|
|
12742
|
+
// Scrolling
|
|
12743
|
+
// -----------------------------------------------------------------------------------------------
|
|
12744
|
+
resetScroll() {
|
|
12745
|
+
this.scrollDate = this.props.dateProfile.currentDate;
|
|
12746
|
+
this.updateScrollY();
|
|
12747
|
+
// updateScrollX
|
|
12748
|
+
const scroller = this.scrollerRef.current;
|
|
12749
|
+
scroller.scrollTo({ x: 0 });
|
|
12658
12750
|
}
|
|
12659
12751
|
}
|
|
12660
12752
|
|
|
@@ -12711,6 +12803,7 @@ var FullCalendar = (function (exports) {
|
|
|
12711
12803
|
}
|
|
12712
12804
|
componentWillUnmount() {
|
|
12713
12805
|
this.disconectInnerHeight();
|
|
12806
|
+
setRef(this.props.innerHeightRef, null);
|
|
12714
12807
|
}
|
|
12715
12808
|
}
|
|
12716
12809
|
|
|
@@ -12829,6 +12922,141 @@ var FullCalendar = (function (exports) {
|
|
|
12829
12922
|
},
|
|
12830
12923
|
});
|
|
12831
12924
|
|
|
12925
|
+
var css_248z$2 = ".fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:flex;flex-direction:column;position:relative}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-inner{color:var(--fc-event-text-color);display:flex;flex-direction:column;flex-grow:1;min-width:0}.fc-v-event .fc-event-time{white-space:nowrap}.fc-v-event .fc-event-time,.fc-v-event .fc-event-title{overflow:hidden}.fc-v-event .fc-event-title-outer{display:flex;flex-direction:column;flex-grow:1;min-width:0}.fc-v-event .fc-event-title{bottom:0;position:sticky;top:0}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-timegrid-axis{align-items:flex-end}.fc-timegrid-axis,.fc-timegrid-axis-inner{display:flex;flex-direction:column;justify-content:center}.fc-timegrid-axis-inner{min-height:1.5em}.fc-timegrid-slot-minor{border-style:dotted}.fc-timegrid-col{position:relative}.fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc-timegrid-bg-harness .fc-non-business{z-index:1}.fc-timegrid-bg-harness .fc-bg-event{z-index:2}.fc-timegrid-bg-harness .fc-highlight,.fc-timegrid-col-fg{z-index:3}.fc-direction-ltr .fc-timegrid-col-fg{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-fg{margin:0 2px 0 2.5%}.fc-timegrid-event{border-radius:3px;bottom:0;font-size:var(--fc-small-font-size);left:0;margin-bottom:1px;position:absolute;right:0;top:0;z-index:3}.fc-timegrid-event-inset,.fc-timegrid-event.fc-event-mirror{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-harness-plain>.fc-timegrid-event{position:static}.fc-timegrid-event .fc-event-inner{padding:1px 1px 0}.fc-timegrid-event-short .fc-event-inner{flex-direction:row;overflow:hidden}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-time:after{content:\"\\00a0-\\00a0\"}.fc-timegrid-event-short .fc-event-title,.fc-timegrid-more-link{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);border-radius:3px;box-shadow:0 0 0 1px var(--fc-page-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;z-index:9999}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc-timegrid-more-link-inner{padding:3px 2px}.fc-timegrid-now-indicator-container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.fc-timegrid-now-indicator-arrow,.fc-timegrid-now-indicator-line{pointer-events:none}.fc-timegrid-now-indicator-line{border-width:1px 0 0;left:0;right:0}.fc-timegrid-now-indicator-arrow,.fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;position:absolute;z-index:4}.fc-timegrid-now-indicator-arrow{margin-top:-5px}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}";
|
|
12926
|
+
injectStyles(css_248z$2);
|
|
12927
|
+
|
|
12928
|
+
/*
|
|
12929
|
+
TODO: more DRY with daygrid?
|
|
12930
|
+
can be given null/undefined!
|
|
12931
|
+
*/
|
|
12932
|
+
function splitSegsByCol(segs, colCnt) {
|
|
12933
|
+
let segsByCol = [];
|
|
12934
|
+
let i;
|
|
12935
|
+
for (i = 0; i < colCnt; i += 1) {
|
|
12936
|
+
segsByCol.push([]);
|
|
12937
|
+
}
|
|
12938
|
+
if (segs) {
|
|
12939
|
+
for (i = 0; i < segs.length; i += 1) {
|
|
12940
|
+
segsByCol[segs[i].col].push(segs[i]);
|
|
12941
|
+
}
|
|
12942
|
+
}
|
|
12943
|
+
return segsByCol;
|
|
12944
|
+
}
|
|
12945
|
+
/*
|
|
12946
|
+
TODO: more DRY with daygrid?
|
|
12947
|
+
can be given null/undefined!
|
|
12948
|
+
*/
|
|
12949
|
+
function splitInteractionByCol(ui, colCnt) {
|
|
12950
|
+
let byRow = [];
|
|
12951
|
+
if (!ui) {
|
|
12952
|
+
for (let i = 0; i < colCnt; i += 1) {
|
|
12953
|
+
byRow[i] = null;
|
|
12954
|
+
}
|
|
12955
|
+
}
|
|
12956
|
+
else {
|
|
12957
|
+
for (let i = 0; i < colCnt; i += 1) {
|
|
12958
|
+
byRow[i] = {
|
|
12959
|
+
affectedInstances: ui.affectedInstances,
|
|
12960
|
+
isEvent: ui.isEvent,
|
|
12961
|
+
segs: [],
|
|
12962
|
+
};
|
|
12963
|
+
}
|
|
12964
|
+
for (let seg of ui.segs) {
|
|
12965
|
+
byRow[seg.col].segs.push(seg);
|
|
12966
|
+
}
|
|
12967
|
+
}
|
|
12968
|
+
return byRow;
|
|
12969
|
+
}
|
|
12970
|
+
|
|
12971
|
+
class DayTimeColsSlicer extends Slicer {
|
|
12972
|
+
sliceRange(range, dayRanges) {
|
|
12973
|
+
let segs = [];
|
|
12974
|
+
for (let col = 0; col < dayRanges.length; col += 1) {
|
|
12975
|
+
let segRange = intersectRanges(range, dayRanges[col]);
|
|
12976
|
+
if (segRange) {
|
|
12977
|
+
segs.push({
|
|
12978
|
+
start: segRange.start,
|
|
12979
|
+
end: segRange.end,
|
|
12980
|
+
isStart: segRange.start.valueOf() === range.start.valueOf(),
|
|
12981
|
+
isEnd: segRange.end.valueOf() === range.end.valueOf(),
|
|
12982
|
+
col,
|
|
12983
|
+
});
|
|
12984
|
+
}
|
|
12985
|
+
}
|
|
12986
|
+
return segs;
|
|
12987
|
+
}
|
|
12988
|
+
}
|
|
12989
|
+
|
|
12990
|
+
// potential nice values for the slot-duration and interval-duration
|
|
12991
|
+
// from largest to smallest
|
|
12992
|
+
const STOCK_SUB_DURATIONS = [
|
|
12993
|
+
{ hours: 1 },
|
|
12994
|
+
{ minutes: 30 },
|
|
12995
|
+
{ minutes: 15 },
|
|
12996
|
+
{ seconds: 30 },
|
|
12997
|
+
{ seconds: 15 },
|
|
12998
|
+
];
|
|
12999
|
+
function buildSlatMetas(slotMinTime, slotMaxTime, explicitLabelInterval, slotDuration, dateEnv) {
|
|
13000
|
+
let dayStart = new Date(0);
|
|
13001
|
+
let slatTime = slotMinTime;
|
|
13002
|
+
let slatIterator = createDuration(0);
|
|
13003
|
+
let labelInterval = explicitLabelInterval || computeLabelInterval(slotDuration);
|
|
13004
|
+
let metas = [];
|
|
13005
|
+
while (asRoughMs(slatTime) < asRoughMs(slotMaxTime)) {
|
|
13006
|
+
let date = dateEnv.add(dayStart, slatTime);
|
|
13007
|
+
let isLabeled = wholeDivideDurations(slatIterator, labelInterval) !== null;
|
|
13008
|
+
metas.push({
|
|
13009
|
+
date,
|
|
13010
|
+
time: slatTime,
|
|
13011
|
+
key: date.toISOString(),
|
|
13012
|
+
isoTimeStr: formatIsoTimeString(date),
|
|
13013
|
+
isLabeled,
|
|
13014
|
+
});
|
|
13015
|
+
slatTime = addDurations(slatTime, slotDuration);
|
|
13016
|
+
slatIterator = addDurations(slatIterator, slotDuration);
|
|
13017
|
+
}
|
|
13018
|
+
return metas;
|
|
13019
|
+
}
|
|
13020
|
+
// Computes an automatic value for slotLabelInterval
|
|
13021
|
+
function computeLabelInterval(slotDuration) {
|
|
13022
|
+
let i;
|
|
13023
|
+
let labelInterval;
|
|
13024
|
+
let slotsPerLabel;
|
|
13025
|
+
// find the smallest stock label interval that results in more than one slots-per-label
|
|
13026
|
+
for (i = STOCK_SUB_DURATIONS.length - 1; i >= 0; i -= 1) {
|
|
13027
|
+
labelInterval = createDuration(STOCK_SUB_DURATIONS[i]);
|
|
13028
|
+
slotsPerLabel = wholeDivideDurations(labelInterval, slotDuration);
|
|
13029
|
+
if (slotsPerLabel !== null && slotsPerLabel > 1) {
|
|
13030
|
+
return labelInterval;
|
|
13031
|
+
}
|
|
13032
|
+
}
|
|
13033
|
+
return slotDuration; // fall back
|
|
13034
|
+
}
|
|
13035
|
+
|
|
13036
|
+
class AllDaySplitter extends Splitter {
|
|
13037
|
+
getKeyInfo() {
|
|
13038
|
+
return {
|
|
13039
|
+
allDay: {},
|
|
13040
|
+
timed: {},
|
|
13041
|
+
};
|
|
13042
|
+
}
|
|
13043
|
+
getKeysForDateSpan(dateSpan) {
|
|
13044
|
+
if (dateSpan.allDay) {
|
|
13045
|
+
return ['allDay'];
|
|
13046
|
+
}
|
|
13047
|
+
return ['timed'];
|
|
13048
|
+
}
|
|
13049
|
+
getKeysForEventDef(eventDef) {
|
|
13050
|
+
if (!eventDef.allDay) {
|
|
13051
|
+
return ['timed'];
|
|
13052
|
+
}
|
|
13053
|
+
if (hasBgRendering(eventDef)) {
|
|
13054
|
+
return ['timed', 'allDay'];
|
|
13055
|
+
}
|
|
13056
|
+
return ['allDay'];
|
|
13057
|
+
}
|
|
13058
|
+
}
|
|
13059
|
+
|
|
12832
13060
|
function buildTimeColsModel(dateProfile, dateProfileGenerator) {
|
|
12833
13061
|
let daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);
|
|
12834
13062
|
return new DayTableModel(daySeries, false);
|
|
@@ -12886,92 +13114,6 @@ var FullCalendar = (function (exports) {
|
|
|
12886
13114
|
].join(' ');
|
|
12887
13115
|
}
|
|
12888
13116
|
|
|
12889
|
-
class AllDaySplitter extends Splitter {
|
|
12890
|
-
getKeyInfo() {
|
|
12891
|
-
return {
|
|
12892
|
-
allDay: {},
|
|
12893
|
-
timed: {},
|
|
12894
|
-
};
|
|
12895
|
-
}
|
|
12896
|
-
getKeysForDateSpan(dateSpan) {
|
|
12897
|
-
if (dateSpan.allDay) {
|
|
12898
|
-
return ['allDay'];
|
|
12899
|
-
}
|
|
12900
|
-
return ['timed'];
|
|
12901
|
-
}
|
|
12902
|
-
getKeysForEventDef(eventDef) {
|
|
12903
|
-
if (!eventDef.allDay) {
|
|
12904
|
-
return ['timed'];
|
|
12905
|
-
}
|
|
12906
|
-
if (hasBgRendering(eventDef)) {
|
|
12907
|
-
return ['timed', 'allDay'];
|
|
12908
|
-
}
|
|
12909
|
-
return ['allDay'];
|
|
12910
|
-
}
|
|
12911
|
-
}
|
|
12912
|
-
|
|
12913
|
-
class DayTimeColsSlicer extends Slicer {
|
|
12914
|
-
sliceRange(range, dayRanges) {
|
|
12915
|
-
let segs = [];
|
|
12916
|
-
for (let col = 0; col < dayRanges.length; col += 1) {
|
|
12917
|
-
let segRange = intersectRanges(range, dayRanges[col]);
|
|
12918
|
-
if (segRange) {
|
|
12919
|
-
segs.push({
|
|
12920
|
-
start: segRange.start,
|
|
12921
|
-
end: segRange.end,
|
|
12922
|
-
isStart: segRange.start.valueOf() === range.start.valueOf(),
|
|
12923
|
-
isEnd: segRange.end.valueOf() === range.end.valueOf(),
|
|
12924
|
-
col,
|
|
12925
|
-
});
|
|
12926
|
-
}
|
|
12927
|
-
}
|
|
12928
|
-
return segs;
|
|
12929
|
-
}
|
|
12930
|
-
}
|
|
12931
|
-
|
|
12932
|
-
/*
|
|
12933
|
-
TODO: more DRY with daygrid?
|
|
12934
|
-
can be given null/undefined!
|
|
12935
|
-
*/
|
|
12936
|
-
function splitSegsByCol(segs, colCnt) {
|
|
12937
|
-
let segsByCol = [];
|
|
12938
|
-
let i;
|
|
12939
|
-
for (i = 0; i < colCnt; i += 1) {
|
|
12940
|
-
segsByCol.push([]);
|
|
12941
|
-
}
|
|
12942
|
-
if (segs) {
|
|
12943
|
-
for (i = 0; i < segs.length; i += 1) {
|
|
12944
|
-
segsByCol[segs[i].col].push(segs[i]);
|
|
12945
|
-
}
|
|
12946
|
-
}
|
|
12947
|
-
return segsByCol;
|
|
12948
|
-
}
|
|
12949
|
-
/*
|
|
12950
|
-
TODO: more DRY with daygrid?
|
|
12951
|
-
can be given null/undefined!
|
|
12952
|
-
*/
|
|
12953
|
-
function splitInteractionByCol(ui, colCnt) {
|
|
12954
|
-
let byRow = [];
|
|
12955
|
-
if (!ui) {
|
|
12956
|
-
for (let i = 0; i < colCnt; i += 1) {
|
|
12957
|
-
byRow[i] = null;
|
|
12958
|
-
}
|
|
12959
|
-
}
|
|
12960
|
-
else {
|
|
12961
|
-
for (let i = 0; i < colCnt; i += 1) {
|
|
12962
|
-
byRow[i] = {
|
|
12963
|
-
affectedInstances: ui.affectedInstances,
|
|
12964
|
-
isEvent: ui.isEvent,
|
|
12965
|
-
segs: [],
|
|
12966
|
-
};
|
|
12967
|
-
}
|
|
12968
|
-
for (let seg of ui.segs) {
|
|
12969
|
-
byRow[seg.col].segs.push(seg);
|
|
12970
|
-
}
|
|
12971
|
-
}
|
|
12972
|
-
return byRow;
|
|
12973
|
-
}
|
|
12974
|
-
|
|
12975
13117
|
const DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'short' });
|
|
12976
13118
|
class TimeGridWeekNumber extends BaseComponent {
|
|
12977
13119
|
constructor() {
|
|
@@ -13002,65 +13144,23 @@ var FullCalendar = (function (exports) {
|
|
|
13002
13144
|
], elAttrs: navLinkAttrs })))));
|
|
13003
13145
|
}
|
|
13004
13146
|
componentDidMount() {
|
|
13147
|
+
const { props } = this;
|
|
13005
13148
|
const innerEl = this.innerElRef.current; // TODO: make dynamic with useEffect
|
|
13006
13149
|
// TODO: only attach this if refs props present
|
|
13007
13150
|
// TODO: handle width/height independently?
|
|
13008
13151
|
this.detachInnerSize = watchSize(innerEl, (width, height) => {
|
|
13009
|
-
setRef(
|
|
13010
|
-
setRef(
|
|
13152
|
+
setRef(props.innerWidthRef, width);
|
|
13153
|
+
setRef(props.innerHeightRef, height);
|
|
13011
13154
|
});
|
|
13012
13155
|
}
|
|
13013
13156
|
componentWillUnmount() {
|
|
13157
|
+
const { props } = this;
|
|
13014
13158
|
this.detachInnerSize();
|
|
13159
|
+
setRef(props.innerWidthRef, null);
|
|
13160
|
+
setRef(props.innerHeightRef, null);
|
|
13015
13161
|
}
|
|
13016
13162
|
}
|
|
13017
13163
|
|
|
13018
|
-
// potential nice values for the slot-duration and interval-duration
|
|
13019
|
-
// from largest to smallest
|
|
13020
|
-
const STOCK_SUB_DURATIONS = [
|
|
13021
|
-
{ hours: 1 },
|
|
13022
|
-
{ minutes: 30 },
|
|
13023
|
-
{ minutes: 15 },
|
|
13024
|
-
{ seconds: 30 },
|
|
13025
|
-
{ seconds: 15 },
|
|
13026
|
-
];
|
|
13027
|
-
function buildSlatMetas(slotMinTime, slotMaxTime, explicitLabelInterval, slotDuration, dateEnv) {
|
|
13028
|
-
let dayStart = new Date(0);
|
|
13029
|
-
let slatTime = slotMinTime;
|
|
13030
|
-
let slatIterator = createDuration(0);
|
|
13031
|
-
let labelInterval = explicitLabelInterval || computeLabelInterval(slotDuration);
|
|
13032
|
-
let metas = [];
|
|
13033
|
-
while (asRoughMs(slatTime) < asRoughMs(slotMaxTime)) {
|
|
13034
|
-
let date = dateEnv.add(dayStart, slatTime);
|
|
13035
|
-
let isLabeled = wholeDivideDurations(slatIterator, labelInterval) !== null;
|
|
13036
|
-
metas.push({
|
|
13037
|
-
date,
|
|
13038
|
-
time: slatTime,
|
|
13039
|
-
key: date.toISOString(),
|
|
13040
|
-
isoTimeStr: formatIsoTimeString(date),
|
|
13041
|
-
isLabeled,
|
|
13042
|
-
});
|
|
13043
|
-
slatTime = addDurations(slatTime, slotDuration);
|
|
13044
|
-
slatIterator = addDurations(slatIterator, slotDuration);
|
|
13045
|
-
}
|
|
13046
|
-
return metas;
|
|
13047
|
-
}
|
|
13048
|
-
// Computes an automatic value for slotLabelInterval
|
|
13049
|
-
function computeLabelInterval(slotDuration) {
|
|
13050
|
-
let i;
|
|
13051
|
-
let labelInterval;
|
|
13052
|
-
let slotsPerLabel;
|
|
13053
|
-
// find the smallest stock label interval that results in more than one slots-per-label
|
|
13054
|
-
for (i = STOCK_SUB_DURATIONS.length - 1; i >= 0; i -= 1) {
|
|
13055
|
-
labelInterval = createDuration(STOCK_SUB_DURATIONS[i]);
|
|
13056
|
-
slotsPerLabel = wholeDivideDurations(labelInterval, slotDuration);
|
|
13057
|
-
if (slotsPerLabel !== null && slotsPerLabel > 1) {
|
|
13058
|
-
return labelInterval;
|
|
13059
|
-
}
|
|
13060
|
-
}
|
|
13061
|
-
return slotDuration; // fall back
|
|
13062
|
-
}
|
|
13063
|
-
|
|
13064
13164
|
class TimeGridAllDayLabel extends BaseComponent {
|
|
13065
13165
|
constructor() {
|
|
13066
13166
|
super(...arguments);
|
|
@@ -13089,15 +13189,19 @@ var FullCalendar = (function (exports) {
|
|
|
13089
13189
|
] })))));
|
|
13090
13190
|
}
|
|
13091
13191
|
componentDidMount() {
|
|
13192
|
+
const { props } = this;
|
|
13092
13193
|
const innerEl = this.innerElRef.current; // TODO: make dynamic with useEffect
|
|
13093
13194
|
// TODO: only attach this if refs props present
|
|
13094
13195
|
this.disconnectInnerSize = watchSize(innerEl, (width, height) => {
|
|
13095
|
-
setRef(
|
|
13096
|
-
setRef(
|
|
13196
|
+
setRef(props.innerWidthRef, width);
|
|
13197
|
+
setRef(props.innerHeightRef, height);
|
|
13097
13198
|
});
|
|
13098
13199
|
}
|
|
13099
13200
|
componentWillUnmount() {
|
|
13201
|
+
const { props } = this;
|
|
13100
13202
|
this.disconnectInnerSize();
|
|
13203
|
+
setRef(props.innerWidthRef, null);
|
|
13204
|
+
setRef(props.innerHeightRef, null);
|
|
13101
13205
|
}
|
|
13102
13206
|
}
|
|
13103
13207
|
function renderAllDayInner$1(renderProps) {
|
|
@@ -13205,19 +13309,23 @@ var FullCalendar = (function (exports) {
|
|
|
13205
13309
|
] })))));
|
|
13206
13310
|
}
|
|
13207
13311
|
componentDidMount() {
|
|
13312
|
+
const { props } = this;
|
|
13208
13313
|
const innerEl = this.innerElRef.current; // TODO: make dynamic with useEffect
|
|
13209
13314
|
if (innerEl) { // could be null if !isLabeled
|
|
13210
13315
|
// TODO: only attach this if refs props present
|
|
13211
13316
|
// TODO: fire width/height independently?
|
|
13212
13317
|
this.detachInnerSize = watchSize(innerEl, (width, height) => {
|
|
13213
|
-
setRef(
|
|
13214
|
-
setRef(
|
|
13318
|
+
setRef(props.innerWidthRef, width);
|
|
13319
|
+
setRef(props.innerHeightRef, height);
|
|
13215
13320
|
});
|
|
13216
13321
|
}
|
|
13217
13322
|
}
|
|
13218
13323
|
componentWillUnmount() {
|
|
13324
|
+
const { props } = this;
|
|
13219
13325
|
if (this.detachInnerSize) {
|
|
13220
13326
|
this.detachInnerSize();
|
|
13327
|
+
setRef(props.innerWidthRef, null);
|
|
13328
|
+
setRef(props.innerHeightRef, null);
|
|
13221
13329
|
}
|
|
13222
13330
|
}
|
|
13223
13331
|
}
|
|
@@ -13257,6 +13365,7 @@ var FullCalendar = (function (exports) {
|
|
|
13257
13365
|
}
|
|
13258
13366
|
componentWillUnmount() {
|
|
13259
13367
|
this.detachInnerHeight();
|
|
13368
|
+
setRef(this.props.innerHeightRef, null);
|
|
13260
13369
|
}
|
|
13261
13370
|
}
|
|
13262
13371
|
|
|
@@ -13455,7 +13564,7 @@ var FullCalendar = (function (exports) {
|
|
|
13455
13564
|
'fc-v-event',
|
|
13456
13565
|
props.isShort ? 'fc-timegrid-event-short' : '',
|
|
13457
13566
|
props.isInset ? 'fc-timegrid-event-inset' : '',
|
|
13458
|
-
], defaultTimeFormat: DEFAULT_TIME_FORMAT$1 })));
|
|
13567
|
+
], defaultTimeFormat: DEFAULT_TIME_FORMAT$1, startOverride: props.segStart, endOverride: props.segEnd })));
|
|
13459
13568
|
}
|
|
13460
13569
|
}
|
|
13461
13570
|
|
|
@@ -13538,7 +13647,8 @@ var FullCalendar = (function (exports) {
|
|
|
13538
13647
|
return (_(k$1, null,
|
|
13539
13648
|
this.renderHiddenGroups(hiddenGroups, segs),
|
|
13540
13649
|
segs.map((seg, index) => {
|
|
13541
|
-
let
|
|
13650
|
+
let { eventRange } = seg;
|
|
13651
|
+
let instanceId = eventRange.instance.instanceId; // guaranteed because it's an fg event
|
|
13542
13652
|
let segVertical = segVerticals[index];
|
|
13543
13653
|
let setRect = segRects[index]; // for horizontals. could be undefined!? HACK
|
|
13544
13654
|
let hStyle = (!isMirror && setRect)
|
|
@@ -13547,7 +13657,7 @@ var FullCalendar = (function (exports) {
|
|
|
13547
13657
|
let isVisible = isMirror || (setRect && !segIsInvisible[instanceId]);
|
|
13548
13658
|
let isInset = setRect && setRect.stackForward > 0;
|
|
13549
13659
|
return (_("div", { className: 'fc-abs', key: forcedKey || instanceId, style: Object.assign({ visibility: isVisible ? '' : 'hidden', top: fracToCssDim(segVertical.start), height: fracToCssDim(segVertical.size) }, hStyle) },
|
|
13550
|
-
_(TimeGridEvent, Object.assign({ seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === eventSelection, isShort: segVertical.isShort, isInset: isInset },
|
|
13660
|
+
_(TimeGridEvent, Object.assign({ eventRange: eventRange, segStart: seg.start, segEnd: seg.end, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === eventSelection, isShort: segVertical.isShort, isInset: isInset }, getEventRangeMeta(eventRange, todayRange, nowDate)))));
|
|
13551
13661
|
})));
|
|
13552
13662
|
}
|
|
13553
13663
|
/*
|
|
@@ -13566,12 +13676,13 @@ var FullCalendar = (function (exports) {
|
|
|
13566
13676
|
let { props, context } = this;
|
|
13567
13677
|
let segVerticals = computeFgSegVerticals(segs, props.dateProfile, props.date, props.slatCnt, props.slatHeight, context.options.eventMinHeight);
|
|
13568
13678
|
return (_(k$1, null, segs.map((seg, index) => {
|
|
13679
|
+
const { eventRange } = seg;
|
|
13569
13680
|
const segVertical = segVerticals[index];
|
|
13570
|
-
return (_("div", { key: buildEventRangeKey(
|
|
13681
|
+
return (_("div", { key: buildEventRangeKey(eventRange), className: "fc-timegrid-bg-harness fc-fill-x", style: {
|
|
13571
13682
|
top: fracToCssDim(segVertical.start),
|
|
13572
13683
|
height: fracToCssDim(segVertical.size),
|
|
13573
13684
|
} }, fillType === 'bg-event' ?
|
|
13574
|
-
_(BgEvent, Object.assign({ seg: seg },
|
|
13685
|
+
_(BgEvent, Object.assign({ eventRange: eventRange, isStart: seg.isStart, isEnd: seg.isEnd }, getEventRangeMeta(eventRange, props.todayRange, props.nowDate))) :
|
|
13575
13686
|
renderFill(fillType)));
|
|
13576
13687
|
})));
|
|
13577
13688
|
}
|
|
@@ -13619,9 +13730,10 @@ var FullCalendar = (function (exports) {
|
|
|
13619
13730
|
(eventResize ? eventResize.affectedInstances : null) ||
|
|
13620
13731
|
{};
|
|
13621
13732
|
return (_(k$1, null, sortedFgSegs.map((seg) => {
|
|
13622
|
-
let
|
|
13733
|
+
let { eventRange } = seg;
|
|
13734
|
+
let instanceId = eventRange.instance.instanceId;
|
|
13623
13735
|
return (_("div", { key: instanceId, className: 'fc-timegrid-harness-plain', style: { visibility: hiddenInstances[instanceId] ? 'hidden' : '' } },
|
|
13624
|
-
_(TimeGridEvent, Object.assign({ seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === eventSelection, isShort: false, isInset: false },
|
|
13736
|
+
_(TimeGridEvent, Object.assign({ eventRange: eventRange, segStart: seg.start, segEnd: seg.end, isStart: seg.isStart, isEnd: seg.isEnd, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === eventSelection, isShort: false, isInset: false }, getEventRangeMeta(eventRange, todayRange, nowDate)))));
|
|
13625
13737
|
})));
|
|
13626
13738
|
}
|
|
13627
13739
|
|
|
@@ -13945,17 +14057,16 @@ var FullCalendar = (function (exports) {
|
|
|
13945
14057
|
this.updateScrollers();
|
|
13946
14058
|
}
|
|
13947
14059
|
updateScrollers() {
|
|
13948
|
-
const { isRtl } = this.context;
|
|
13949
14060
|
this.dayScroller.handleChildren([
|
|
13950
14061
|
this.headerScrollerRef.current,
|
|
13951
14062
|
this.allDayScrollerRef.current,
|
|
13952
14063
|
this.mainScrollerRef.current,
|
|
13953
14064
|
this.footScrollerRef.current,
|
|
13954
|
-
]
|
|
14065
|
+
]);
|
|
13955
14066
|
this.timeScroller.handleChildren([
|
|
13956
14067
|
this.axisScrollerRef.current,
|
|
13957
14068
|
this.mainScrollerRef.current,
|
|
13958
|
-
]
|
|
14069
|
+
]);
|
|
13959
14070
|
}
|
|
13960
14071
|
destroyScrollers() {
|
|
13961
14072
|
setRef(this.props.dayScrollerRef, null);
|
|
@@ -14109,35 +14220,35 @@ var FullCalendar = (function (exports) {
|
|
|
14109
14220
|
// refs
|
|
14110
14221
|
this.dayScrollerRef = m$1();
|
|
14111
14222
|
this.timeScrollerRef = m$1();
|
|
14112
|
-
|
|
14223
|
+
this.scrollTime = null;
|
|
14224
|
+
// Sizing
|
|
14113
14225
|
// -----------------------------------------------------------------------------------------------
|
|
14114
14226
|
this.handleSlatHeight = (slatHeight) => {
|
|
14115
14227
|
this.slatHeight = slatHeight;
|
|
14116
|
-
afterSize(this.
|
|
14228
|
+
afterSize(this.updateScroll);
|
|
14117
14229
|
};
|
|
14118
|
-
this.
|
|
14119
|
-
this.
|
|
14230
|
+
this.handleTimeScroll = (scrollTime) => {
|
|
14231
|
+
this.scrollTime = scrollTime;
|
|
14232
|
+
this.updateScroll();
|
|
14120
14233
|
};
|
|
14121
|
-
this.
|
|
14122
|
-
const dayScroller = this.dayScrollerRef.current;
|
|
14234
|
+
this.updateScroll = () => {
|
|
14123
14235
|
const timeScroller = this.timeScrollerRef.current;
|
|
14124
|
-
const { slatHeight } = this;
|
|
14125
|
-
|
|
14126
|
-
|
|
14236
|
+
const { scrollTime, slatHeight } = this;
|
|
14237
|
+
// Since updateScroll is called by handleSlatHeight, could be called with null during cleanup,
|
|
14238
|
+
// and the timeScroller might not exist
|
|
14239
|
+
if (timeScroller && scrollTime && slatHeight != null) {
|
|
14240
|
+
let top = computeTimeTopFrac(scrollTime, this.props.dateProfile)
|
|
14127
14241
|
* (slatHeight * this.currentSlatCnt)
|
|
14128
14242
|
+ (this.context.isRtl ? -1 : 1); // overcome border
|
|
14129
14243
|
if (top) {
|
|
14130
14244
|
top++; // overcome top border
|
|
14131
14245
|
}
|
|
14132
14246
|
timeScroller.scrollTo({ y: top });
|
|
14133
|
-
// HACK to scroll to day
|
|
14134
|
-
if (dayScroller) {
|
|
14135
|
-
dayScroller.scrollTo({ x: 0 });
|
|
14136
|
-
}
|
|
14137
|
-
return true;
|
|
14138
14247
|
}
|
|
14139
|
-
|
|
14140
|
-
|
|
14248
|
+
};
|
|
14249
|
+
this.clearScroll = () => {
|
|
14250
|
+
this.scrollTime = null;
|
|
14251
|
+
};
|
|
14141
14252
|
}
|
|
14142
14253
|
render() {
|
|
14143
14254
|
const { props, context } = this;
|
|
@@ -14166,22 +14277,27 @@ var FullCalendar = (function (exports) {
|
|
|
14166
14277
|
// Lifecycle
|
|
14167
14278
|
// -----------------------------------------------------------------------------------------------
|
|
14168
14279
|
componentDidMount() {
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
this.timeScrollResponder.handleScroll(options.scrollTime);
|
|
14280
|
+
this.resetScroll();
|
|
14281
|
+
this.context.emitter.on('_timeScrollRequest', this.handleTimeScroll);
|
|
14282
|
+
this.timeScrollerRef.current.addScrollEndListener(this.clearScroll);
|
|
14173
14283
|
}
|
|
14174
14284
|
componentDidUpdate(prevProps) {
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
this.timeScrollResponder.handleScroll(options.scrollTime);
|
|
14178
|
-
}
|
|
14179
|
-
else {
|
|
14180
|
-
this.handleSize();
|
|
14285
|
+
if (prevProps.dateProfile !== this.props.dateProfile && this.context.options.scrollTimeReset) {
|
|
14286
|
+
this.resetScroll();
|
|
14181
14287
|
}
|
|
14182
14288
|
}
|
|
14183
14289
|
componentWillUnmount() {
|
|
14184
|
-
this.context.emitter.off('_timeScrollRequest', this.
|
|
14290
|
+
this.context.emitter.off('_timeScrollRequest', this.handleTimeScroll);
|
|
14291
|
+
this.timeScrollerRef.current.removeScrollEndListener(this.clearScroll);
|
|
14292
|
+
}
|
|
14293
|
+
// Scrolling
|
|
14294
|
+
// -----------------------------------------------------------------------------------------------
|
|
14295
|
+
resetScroll() {
|
|
14296
|
+
this.handleTimeScroll(this.context.options.scrollTime);
|
|
14297
|
+
const dayScroller = this.dayScrollerRef.current;
|
|
14298
|
+
if (dayScroller) {
|
|
14299
|
+
dayScroller.scrollTo({ x: 0 });
|
|
14300
|
+
}
|
|
14185
14301
|
}
|
|
14186
14302
|
}
|
|
14187
14303
|
// Utils
|
|
@@ -14251,9 +14367,6 @@ var FullCalendar = (function (exports) {
|
|
|
14251
14367
|
}
|
|
14252
14368
|
}
|
|
14253
14369
|
|
|
14254
|
-
var css_248z$2 = ".fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:flex;flex-direction:column;position:relative}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-inner{color:var(--fc-event-text-color);display:flex;flex-direction:column;flex-grow:1;min-width:0}.fc-v-event .fc-event-time{white-space:nowrap}.fc-v-event .fc-event-time,.fc-v-event .fc-event-title{overflow:hidden}.fc-v-event .fc-event-title-outer{display:flex;flex-direction:column;flex-grow:1;min-width:0}.fc-v-event .fc-event-title{bottom:0;position:sticky;top:0}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-timegrid-axis{align-items:flex-end}.fc-timegrid-axis,.fc-timegrid-axis-inner{display:flex;flex-direction:column;justify-content:center}.fc-timegrid-axis-inner{min-height:1.5em}.fc-timegrid-slot-minor{border-style:dotted}.fc-timegrid-col{position:relative}.fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc-timegrid-bg-harness .fc-non-business{z-index:1}.fc-timegrid-bg-harness .fc-bg-event{z-index:2}.fc-timegrid-bg-harness .fc-highlight,.fc-timegrid-col-fg{z-index:3}.fc-direction-ltr .fc-timegrid-col-fg{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-fg{margin:0 2px 0 2.5%}.fc-timegrid-event{border-radius:3px;bottom:0;font-size:var(--fc-small-font-size);left:0;margin-bottom:1px;position:absolute;right:0;top:0;z-index:3}.fc-timegrid-event-inset,.fc-timegrid-event.fc-event-mirror{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-harness-plain>.fc-timegrid-event{position:static}.fc-timegrid-event .fc-event-inner{padding:1px 1px 0}.fc-timegrid-event-short .fc-event-inner{flex-direction:row;overflow:hidden}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-time:after{content:\"\\00a0-\\00a0\"}.fc-timegrid-event-short .fc-event-title,.fc-timegrid-more-link{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);border-radius:3px;box-shadow:0 0 0 1px var(--fc-page-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;z-index:9999}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc-timegrid-more-link-inner{padding:3px 2px}.fc-timegrid-now-indicator-container{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.fc-timegrid-now-indicator-arrow,.fc-timegrid-now-indicator-line{pointer-events:none}.fc-timegrid-now-indicator-line{border-width:1px 0 0;left:0;right:0}.fc-timegrid-now-indicator-arrow,.fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;position:absolute;z-index:4}.fc-timegrid-now-indicator-arrow{margin-top:-5px}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}";
|
|
14255
|
-
injectStyles(css_248z$2);
|
|
14256
|
-
|
|
14257
14370
|
const OPTION_REFINERS$2 = {
|
|
14258
14371
|
allDaySlot: Boolean,
|
|
14259
14372
|
};
|
|
@@ -14281,6 +14394,9 @@ var FullCalendar = (function (exports) {
|
|
|
14281
14394
|
},
|
|
14282
14395
|
});
|
|
14283
14396
|
|
|
14397
|
+
var css_248z$1 = ":root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-table{border-spacing:0;width:100%}.fc-table>*>*>*{border-color:var(--fc-border-color);border-style:solid;border-width:0 0 1px;padding:0}.fc-table>:last-child>:last-child>*{border-bottom-width:0}.fc-list-day-inner,.fc-list-event-dot-cell,.fc-list-event-time,.fc-list-event-title{padding:8px 14px}.fc-direction-ltr .fc-list-event-dot-cell{padding-right:0}.fc-direction-rtl .fc-list-event-dot-cell{padding-left:0}.fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc-list-empty-inner{margin:5em 0}.fc-list-day-cell-sticky{background:var(--fc-page-bg-color);position:sticky;top:0}.fc-list-day-inner{background:var(--fc-neutral-bg-color);display:flex;justify-content:space-between}.fc-list-event.fc-event-forced-url{cursor:pointer}.fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc-list-event-dot-cell,.fc-list-event-time{white-space:nowrap;width:1px}.fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc-list-event-title a{color:inherit;text-decoration:none}.fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}";
|
|
14398
|
+
injectStyles(css_248z$1);
|
|
14399
|
+
|
|
14284
14400
|
class ListViewHeaderRow extends BaseComponent {
|
|
14285
14401
|
constructor() {
|
|
14286
14402
|
super(...arguments);
|
|
@@ -14332,13 +14448,13 @@ var FullCalendar = (function (exports) {
|
|
|
14332
14448
|
render() {
|
|
14333
14449
|
let { props, context } = this;
|
|
14334
14450
|
let { options } = context;
|
|
14335
|
-
let {
|
|
14451
|
+
let { eventRange, timeHeaderId, eventHeaderId, dateHeaderId } = props;
|
|
14336
14452
|
let timeFormat = options.eventTimeFormat || DEFAULT_TIME_FORMAT;
|
|
14337
14453
|
return (_(EventContainer, Object.assign({}, props, { elTag: "tr", elClasses: [
|
|
14338
14454
|
'fc-list-event',
|
|
14339
|
-
|
|
14340
|
-
], defaultGenerator: () => renderEventInnerContent(
|
|
14341
|
-
buildTimeContent(
|
|
14455
|
+
eventRange.def.url && 'fc-event-forced-url',
|
|
14456
|
+
], defaultGenerator: () => renderEventInnerContent(eventRange, context) /* weird */, eventRange: eventRange, timeText: "", disableDragging: true, disableResizing: true }), (InnerContent, eventContentArg) => (_(k$1, null,
|
|
14457
|
+
buildTimeContent(eventRange, props.isStart, props.isEnd, props.segStart, props.segEnd, timeFormat, context, timeHeaderId, dateHeaderId),
|
|
14342
14458
|
_("td", { "aria-hidden": true, className: "fc-list-event-dot-cell" },
|
|
14343
14459
|
_("span", { className: "fc-list-event-dot", style: {
|
|
14344
14460
|
borderColor: eventContentArg.borderColor || eventContentArg.backgroundColor,
|
|
@@ -14346,33 +14462,33 @@ var FullCalendar = (function (exports) {
|
|
|
14346
14462
|
_(InnerContent, { elTag: "td", elClasses: ['fc-list-event-title'], elAttrs: { headers: `${eventHeaderId} ${dateHeaderId}` } })))));
|
|
14347
14463
|
}
|
|
14348
14464
|
}
|
|
14349
|
-
function renderEventInnerContent(
|
|
14350
|
-
let interactiveAttrs =
|
|
14351
|
-
return (_("a", Object.assign({}, interactiveAttrs),
|
|
14465
|
+
function renderEventInnerContent(eventRange, context) {
|
|
14466
|
+
let interactiveAttrs = getEventRangeAnchorAttrs(eventRange, context);
|
|
14467
|
+
return (_("a", Object.assign({}, interactiveAttrs), eventRange.def.title));
|
|
14352
14468
|
}
|
|
14353
|
-
function buildTimeContent(
|
|
14469
|
+
function buildTimeContent(eventRange, isStart, isEnd, segStart, segEnd, timeFormat, context, timeHeaderId, dateHeaderId) {
|
|
14354
14470
|
let { options } = context;
|
|
14355
14471
|
if (options.displayEventTime !== false) {
|
|
14356
|
-
let eventDef =
|
|
14357
|
-
let eventInstance =
|
|
14472
|
+
let eventDef = eventRange.def;
|
|
14473
|
+
let eventInstance = eventRange.instance;
|
|
14358
14474
|
let doAllDay = false;
|
|
14359
14475
|
let timeText;
|
|
14360
14476
|
if (eventDef.allDay) {
|
|
14361
14477
|
doAllDay = true;
|
|
14362
14478
|
}
|
|
14363
|
-
else if (isMultiDayRange(
|
|
14364
|
-
if (
|
|
14365
|
-
timeText =
|
|
14479
|
+
else if (isMultiDayRange(eventRange.range)) { // TODO: use (!isStart || !isEnd) instead?
|
|
14480
|
+
if (isStart) {
|
|
14481
|
+
timeText = buildEventRangeTimeText(eventRange, timeFormat, context, null, null, eventInstance.range.start, segEnd);
|
|
14366
14482
|
}
|
|
14367
|
-
else if (
|
|
14368
|
-
timeText =
|
|
14483
|
+
else if (isEnd) {
|
|
14484
|
+
timeText = buildEventRangeTimeText(eventRange, timeFormat, context, null, null, segStart, eventInstance.range.end);
|
|
14369
14485
|
}
|
|
14370
14486
|
else {
|
|
14371
14487
|
doAllDay = true;
|
|
14372
14488
|
}
|
|
14373
14489
|
}
|
|
14374
14490
|
else {
|
|
14375
|
-
timeText =
|
|
14491
|
+
timeText = buildEventRangeTimeText(eventRange, timeFormat, context, null, null, segStart, segEnd);
|
|
14376
14492
|
}
|
|
14377
14493
|
if (doAllDay) {
|
|
14378
14494
|
let renderProps = {
|
|
@@ -14454,7 +14570,7 @@ var FullCalendar = (function (exports) {
|
|
|
14454
14570
|
innerNodes.push(_(ListViewHeaderRow, { key: dayStr, forPrint: this.props.forPrint, cellId: dateHeaderId, dayDate: dayDates[dayIndex], todayRange: todayRange }));
|
|
14455
14571
|
daySegs = sortEventSegs(daySegs, options.eventOrder);
|
|
14456
14572
|
for (let seg of daySegs) {
|
|
14457
|
-
innerNodes.push(_(ListViewEventRow, Object.assign({ key: dayStr + ':' + seg.eventRange.instance.instanceId /* are multiple segs for an instanceId */, seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, timeHeaderId: timeHeaderId, eventHeaderId: eventHeaderId, dateHeaderId: dateHeaderId },
|
|
14573
|
+
innerNodes.push(_(ListViewEventRow, Object.assign({ key: dayStr + ':' + seg.eventRange.instance.instanceId /* are multiple segs for an instanceId */, eventRange: seg.eventRange, isStart: seg.isStart, isEnd: seg.isEnd, segStart: seg.start, segEnd: seg.end, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, timeHeaderId: timeHeaderId, eventHeaderId: eventHeaderId, dateHeaderId: dateHeaderId }, getEventRangeMeta(seg.eventRange, todayRange, nowDate))));
|
|
14458
14574
|
}
|
|
14459
14575
|
}
|
|
14460
14576
|
}
|
|
@@ -14490,7 +14606,6 @@ var FullCalendar = (function (exports) {
|
|
|
14490
14606
|
segRange = intersectRanges(range, dayRanges[dayIndex]);
|
|
14491
14607
|
if (segRange) {
|
|
14492
14608
|
seg = {
|
|
14493
|
-
component: this,
|
|
14494
14609
|
eventRange,
|
|
14495
14610
|
start: segRange.start,
|
|
14496
14611
|
end: segRange.end,
|
|
@@ -14545,9 +14660,6 @@ var FullCalendar = (function (exports) {
|
|
|
14545
14660
|
return segsByDay;
|
|
14546
14661
|
}
|
|
14547
14662
|
|
|
14548
|
-
var css_248z$1 = ":root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-table{border-spacing:0;width:100%}.fc-table>*>*>*{border-color:var(--fc-border-color);border-style:solid;border-width:0 0 1px;padding:0}.fc-table>:last-child>:last-child>*{border-bottom-width:0}.fc-list-day-inner,.fc-list-event-dot-cell,.fc-list-event-time,.fc-list-event-title{padding:8px 14px}.fc-direction-ltr .fc-list-event-dot-cell{padding-right:0}.fc-direction-rtl .fc-list-event-dot-cell{padding-left:0}.fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc-list-empty-inner{margin:5em 0}.fc-list-day-cell-sticky{background:var(--fc-page-bg-color);position:sticky;top:0}.fc-list-day-inner{background:var(--fc-neutral-bg-color);display:flex;justify-content:space-between}.fc-list-event.fc-event-forced-url{cursor:pointer}.fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc-list-event-dot-cell,.fc-list-event-time{white-space:nowrap;width:1px}.fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc-list-event-title a{color:inherit;text-decoration:none}.fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}";
|
|
14549
|
-
injectStyles(css_248z$1);
|
|
14550
|
-
|
|
14551
14663
|
const OPTION_REFINERS$1 = {
|
|
14552
14664
|
listDayFormat: createFalsableFormatter,
|
|
14553
14665
|
listDaySideFormat: createFalsableFormatter,
|
|
@@ -14639,9 +14751,13 @@ var FullCalendar = (function (exports) {
|
|
|
14639
14751
|
this.splitDateProfileByMonth = memoize(splitDateProfileByMonth);
|
|
14640
14752
|
this.buildMonthFormat = memoize(buildMonthFormat);
|
|
14641
14753
|
// ref
|
|
14642
|
-
this.
|
|
14754
|
+
this.scrollerRef = m$1();
|
|
14643
14755
|
this.innerElRef = m$1();
|
|
14644
|
-
|
|
14756
|
+
// internal
|
|
14757
|
+
this.scrollDate = null;
|
|
14758
|
+
// Sizing
|
|
14759
|
+
// -----------------------------------------------------------------------------------------------
|
|
14760
|
+
this.handleWidth = (width) => {
|
|
14645
14761
|
let { xGap, xPadding } = this.state;
|
|
14646
14762
|
// for first time, assume 2 columns and query gap/padding
|
|
14647
14763
|
if (xGap == null) {
|
|
@@ -14655,37 +14771,38 @@ var FullCalendar = (function (exports) {
|
|
|
14655
14771
|
Math.abs(box0.left - box1.right),
|
|
14656
14772
|
Math.abs(box0.right - box1.left),
|
|
14657
14773
|
].sort(compareNumbers);
|
|
14658
|
-
xPadding =
|
|
14774
|
+
xPadding = width - xSpan;
|
|
14659
14775
|
}
|
|
14660
14776
|
}
|
|
14661
|
-
this.setState({
|
|
14777
|
+
this.setState({ width, xGap, xPadding });
|
|
14662
14778
|
};
|
|
14663
|
-
this.
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
const { currentDate } = this.props.dateProfile;
|
|
14667
|
-
const rootEl = this.rootElRef.current;
|
|
14779
|
+
this.updateScroll = () => {
|
|
14780
|
+
if (this.scrollDate != null && this.state.width != null) {
|
|
14781
|
+
const scroller = this.scrollerRef.current;
|
|
14668
14782
|
const innerEl = this.innerElRef.current;
|
|
14669
|
-
const monthEl = innerEl.querySelector(`[data-date="${formatIsoMonthStr(
|
|
14670
|
-
|
|
14783
|
+
const monthEl = innerEl.querySelector(`[data-date="${formatIsoMonthStr(this.scrollDate)}"]`);
|
|
14784
|
+
const scrollTop = Math.ceil(// for fractions, err on the side of scrolling further
|
|
14671
14785
|
monthEl.getBoundingClientRect().top -
|
|
14672
14786
|
innerEl.getBoundingClientRect().top);
|
|
14673
|
-
|
|
14787
|
+
scroller.scrollTo({ y: scrollTop });
|
|
14674
14788
|
}
|
|
14675
|
-
|
|
14676
|
-
|
|
14789
|
+
};
|
|
14790
|
+
this.clearScroll = () => {
|
|
14791
|
+
this.scrollDate = null;
|
|
14792
|
+
};
|
|
14677
14793
|
}
|
|
14678
14794
|
render() {
|
|
14679
14795
|
const { context, props, state } = this;
|
|
14680
14796
|
const { options } = context;
|
|
14681
|
-
const
|
|
14797
|
+
const verticalScrolling = !props.forPrint && !getIsHeightAuto(options);
|
|
14798
|
+
const colCount = state.width == null
|
|
14682
14799
|
? 2
|
|
14683
|
-
: Math.min(options.multiMonthMaxColumns, Math.floor((state.
|
|
14800
|
+
: Math.min(options.multiMonthMaxColumns, Math.floor((state.width - state.xPadding + state.xGap) /
|
|
14684
14801
|
(options.multiMonthMinWidth + state.xGap)));
|
|
14685
|
-
const monthWidth = state.
|
|
14802
|
+
const monthWidth = state.width == null
|
|
14686
14803
|
? '34%' // will expand. now small enough to be 1/3. for allowing gap
|
|
14687
14804
|
: Math.floor(// exact values can cause expansion to other rows
|
|
14688
|
-
(state.
|
|
14805
|
+
(state.width - state.xPadding - (state.xGap * (colCount - 1))) /
|
|
14689
14806
|
colCount);
|
|
14690
14807
|
const monthDateProfiles = this.splitDateProfileByMonth(context.dateProfileGenerator, props.dateProfile, context.dateEnv, options.fixedWeekCount, options.showNonCurrentDates);
|
|
14691
14808
|
const monthTitleFormat = this.buildMonthFormat(options.multiMonthTitleFormat, monthDateProfiles);
|
|
@@ -14694,36 +14811,42 @@ var FullCalendar = (function (exports) {
|
|
|
14694
14811
|
(colCount === 1) ?
|
|
14695
14812
|
'fc-multimonth-singlecol' :
|
|
14696
14813
|
'fc-multimonth-multicol',
|
|
14697
|
-
|
|
14698
|
-
'' :
|
|
14699
|
-
'fc-multimonth-scroll',
|
|
14814
|
+
'fc-flex-column',
|
|
14700
14815
|
'fc-border', // BAD to mix this with size-listening?
|
|
14701
14816
|
];
|
|
14702
|
-
return (_(NowTimer, { unit: "day" }, (nowDate, todayRange) => (_(ViewContainer, {
|
|
14703
|
-
_(
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
|
|
14817
|
+
return (_(NowTimer, { unit: "day" }, (nowDate, todayRange) => (_(ViewContainer, { elClasses: rootClassNames, viewSpec: context.viewSpec },
|
|
14818
|
+
_(Scroller, { vertical: verticalScrolling, elClassNames: [
|
|
14819
|
+
verticalScrolling ? 'fc-liquid' : '',
|
|
14820
|
+
], ref: this.scrollerRef, widthRef: this.handleWidth },
|
|
14821
|
+
_("div", { ref: this.innerElRef, className: 'fc-multimonth-inner' }, monthDateProfiles.map((monthDateProfile, i) => {
|
|
14822
|
+
const monthStr = formatIsoMonthStr(monthDateProfile.currentRange.start);
|
|
14823
|
+
return (_(SingleMonth, Object.assign({}, props, { key: monthStr, todayRange: todayRange, isoDateStr: monthStr, titleFormat: monthTitleFormat, dateProfile: monthDateProfile, width: monthWidth })));
|
|
14824
|
+
})))))));
|
|
14707
14825
|
}
|
|
14826
|
+
// Lifecycle
|
|
14827
|
+
// -----------------------------------------------------------------------------------------------
|
|
14708
14828
|
componentDidMount() {
|
|
14709
|
-
|
|
14710
|
-
|
|
14711
|
-
this.unwatchWidth = watchWidth(this.rootElRef.current, this.handleClientWidth);
|
|
14712
|
-
context.emitter.on('_timeScrollRequest', this.timeScrollResponder.handleScroll);
|
|
14713
|
-
this.timeScrollResponder.handleScroll(options.scrollTime);
|
|
14829
|
+
this.resetScroll();
|
|
14830
|
+
this.scrollerRef.current.addScrollEndListener(this.clearScroll);
|
|
14714
14831
|
}
|
|
14715
14832
|
componentDidUpdate(prevProps) {
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
this.timeScrollResponder.handleScroll(options.scrollTime);
|
|
14833
|
+
if (prevProps.dateProfile !== this.props.dateProfile && this.context.options.scrollTimeReset) {
|
|
14834
|
+
this.resetScroll();
|
|
14719
14835
|
}
|
|
14720
14836
|
else {
|
|
14721
|
-
|
|
14837
|
+
// NOT optimal to update so often
|
|
14838
|
+
// TODO: isolate dependencies of scroll coordinate
|
|
14839
|
+
this.updateScroll();
|
|
14722
14840
|
}
|
|
14723
14841
|
}
|
|
14724
14842
|
componentWillUnmount() {
|
|
14725
|
-
this.
|
|
14726
|
-
|
|
14843
|
+
this.scrollerRef.current.removeScrollEndListener(this.clearScroll);
|
|
14844
|
+
}
|
|
14845
|
+
// Scrolling
|
|
14846
|
+
// -----------------------------------------------------------------------------------------------
|
|
14847
|
+
resetScroll() {
|
|
14848
|
+
this.scrollDate = this.props.dateProfile.currentDate;
|
|
14849
|
+
this.updateScroll();
|
|
14727
14850
|
}
|
|
14728
14851
|
}
|
|
14729
14852
|
// date profile
|
|
@@ -14789,7 +14912,7 @@ var FullCalendar = (function (exports) {
|
|
|
14789
14912
|
multiMonthMinWidth: Number,
|
|
14790
14913
|
};
|
|
14791
14914
|
|
|
14792
|
-
var css_248z = ".fc-multimonth-
|
|
14915
|
+
var css_248z = ".fc-multimonth-inner{display:flex;flex-wrap:wrap}.fc-multimonth-multicol .fc-multimonth-month{margin:0 1.2em 1.2em}.fc-multimonth-multicol .fc-multimonth-title{padding:1em 0}.fc-multimonth-singlecol .fc-multimonth-title{padding:.5em 0}.fc-multimonth-title{font-size:1.2em;font-weight:700;text-align:center}.fc-multimonth-header-row{border-top:1px solid var(--fc-border-color)}.fc-multimonth-header-row,.fc-multimonth-month{border-bottom:1px solid var(--fc-border-color)}.fc-multimonth-singlecol .fc-multimonth-month:last-child{border-bottom:0}.fc-multimonth-multicol .fc-multimonth-body,.fc-multimonth-multicol .fc-multimonth-header-row{border-left:1px solid var(--fc-border-color);border-right:1px solid var(--fc-border-color);font-size:.9em;line-height:1}.fc-media-screen .fc-multimonth-singlecol .fc-multimonth-header{background:var(--fc-page-bg-color);position:sticky;top:0;z-index:2}.fc-media-screen .fc-multimonth-singlecol .fc-multimonth-body{position:relative;z-index:1}";
|
|
14793
14916
|
injectStyles(css_248z);
|
|
14794
14917
|
|
|
14795
14918
|
var index = createPlugin({
|