@fullcalendar/timeline 5.10.1 → 6.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/main.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
- FullCalendar Scheduler v5.10.1
2
+ FullCalendar Scheduler v6.0.0-beta.1
3
3
  Docs & License: https://fullcalendar.io/scheduler
4
- (c) 2021 Adam Shaw
4
+ (c) 2022 Adam Shaw
5
5
  */
6
6
  'use strict';
7
7
 
@@ -9,20 +9,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  var common = require('@fullcalendar/common');
11
11
  var premiumCommonPlugin = require('@fullcalendar/premium-common');
12
- var tslib = require('tslib');
13
12
  var scrollgrid = require('@fullcalendar/scrollgrid');
14
- ;
15
13
 
16
14
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
15
 
18
16
  var premiumCommonPlugin__default = /*#__PURE__*/_interopDefaultLegacy(premiumCommonPlugin);
19
17
 
20
- var MIN_AUTO_LABELS = 18; // more than `12` months but less that `24` hours
21
- var MAX_AUTO_SLOTS_PER_LABEL = 6; // allows 6 10-min slots in an hour
22
- var MAX_AUTO_CELLS = 200; // allows 4-days to have a :30 slot duration
18
+ const MIN_AUTO_LABELS = 18; // more than `12` months but less that `24` hours
19
+ const MAX_AUTO_SLOTS_PER_LABEL = 6; // allows 6 10-min slots in an hour
20
+ const MAX_AUTO_CELLS = 200; // allows 4-days to have a :30 slot duration
23
21
  common.config.MAX_TIMELINE_SLOTS = 1000;
24
22
  // potential nice values for slot-duration and interval-duration
25
- var STOCK_SUB_DURATIONS = [
23
+ const STOCK_SUB_DURATIONS = [
26
24
  { years: 1 },
27
25
  { months: 1 },
28
26
  { days: 1 },
@@ -43,22 +41,22 @@ var STOCK_SUB_DURATIONS = [
43
41
  { milliseconds: 1 },
44
42
  ];
45
43
  function buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileGenerator) {
46
- var tDateProfile = {
44
+ let tDateProfile = {
47
45
  labelInterval: allOptions.slotLabelInterval,
48
46
  slotDuration: allOptions.slotDuration,
49
47
  };
50
48
  validateLabelAndSlot(tDateProfile, dateProfile, dateEnv); // validate after computed grid duration
51
49
  ensureLabelInterval(tDateProfile, dateProfile, dateEnv);
52
50
  ensureSlotDuration(tDateProfile, dateProfile, dateEnv);
53
- var input = allOptions.slotLabelFormat;
54
- var rawFormats = Array.isArray(input) ? input :
51
+ let input = allOptions.slotLabelFormat;
52
+ let rawFormats = Array.isArray(input) ? input :
55
53
  (input != null) ? [input] :
56
54
  computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions);
57
- tDateProfile.headerFormats = rawFormats.map(function (rawFormat) { return common.createFormatter(rawFormat); });
55
+ tDateProfile.headerFormats = rawFormats.map((rawFormat) => common.createFormatter(rawFormat));
58
56
  tDateProfile.isTimeScale = Boolean(tDateProfile.slotDuration.milliseconds);
59
- var largeUnit = null;
57
+ let largeUnit = null;
60
58
  if (!tDateProfile.isTimeScale) {
61
- var slotUnit = common.greatestDurationDenominator(tDateProfile.slotDuration).unit;
59
+ const slotUnit = common.greatestDurationDenominator(tDateProfile.slotDuration).unit;
62
60
  if (/year|month|week/.test(slotUnit)) {
63
61
  largeUnit = slotUnit;
64
62
  }
@@ -75,9 +73,9 @@ function buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileG
75
73
  console.log('isTimeScale', timelineView.isTimeScale)
76
74
  console.log('largeUnit', timelineView.largeUnit)
77
75
  */
78
- var rawSnapDuration = allOptions.snapDuration;
79
- var snapDuration;
80
- var snapsPerSlot;
76
+ let rawSnapDuration = allOptions.snapDuration;
77
+ let snapDuration;
78
+ let snapsPerSlot;
81
79
  if (rawSnapDuration) {
82
80
  snapDuration = common.createDuration(rawSnapDuration);
83
81
  snapsPerSlot = common.wholeDivideDurations(tDateProfile.slotDuration, snapDuration);
@@ -90,10 +88,10 @@ function buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileG
90
88
  tDateProfile.snapDuration = snapDuration;
91
89
  tDateProfile.snapsPerSlot = snapsPerSlot;
92
90
  // more...
93
- var timeWindowMs = common.asRoughMs(dateProfile.slotMaxTime) - common.asRoughMs(dateProfile.slotMinTime);
91
+ let timeWindowMs = common.asRoughMs(dateProfile.slotMaxTime) - common.asRoughMs(dateProfile.slotMinTime);
94
92
  // TODO: why not use normalizeRange!?
95
- var normalizedStart = normalizeDate(dateProfile.renderRange.start, tDateProfile, dateEnv);
96
- var normalizedEnd = normalizeDate(dateProfile.renderRange.end, tDateProfile, dateEnv);
93
+ let normalizedStart = normalizeDate(dateProfile.renderRange.start, tDateProfile, dateEnv);
94
+ let normalizedEnd = normalizeDate(dateProfile.renderRange.end, tDateProfile, dateEnv);
97
95
  // apply slotMinTime/slotMaxTime
98
96
  // TODO: View should be responsible.
99
97
  if (tDateProfile.isTimeScale) {
@@ -102,8 +100,8 @@ function buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileG
102
100
  }
103
101
  tDateProfile.timeWindowMs = timeWindowMs;
104
102
  tDateProfile.normalizedRange = { start: normalizedStart, end: normalizedEnd };
105
- var slotDates = [];
106
- var date = normalizedStart;
103
+ let slotDates = [];
104
+ let date = normalizedStart;
107
105
  while (date < normalizedEnd) {
108
106
  if (isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator)) {
109
107
  slotDates.push(date);
@@ -112,10 +110,10 @@ function buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileG
112
110
  }
113
111
  tDateProfile.slotDates = slotDates;
114
112
  // more...
115
- var snapIndex = -1;
116
- var snapDiff = 0; // index of the diff :(
117
- var snapDiffToIndex = [];
118
- var snapIndexToDiff = [];
113
+ let snapIndex = -1;
114
+ let snapDiff = 0; // index of the diff :(
115
+ const snapDiffToIndex = [];
116
+ const snapIndexToDiff = [];
119
117
  date = normalizedStart;
120
118
  while (date < normalizedEnd) {
121
119
  if (isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator)) {
@@ -143,7 +141,7 @@ function buildTimelineDateProfile(dateProfile, dateEnv, allOptions, dateProfileG
143
141
  snaps to appropriate unit
144
142
  */
145
143
  function normalizeDate(date, tDateProfile, dateEnv) {
146
- var normalDate = date;
144
+ let normalDate = date;
147
145
  if (!tDateProfile.isTimeScale) {
148
146
  normalDate = common.startOfDay(normalDate);
149
147
  if (tDateProfile.largeUnit) {
@@ -159,7 +157,7 @@ function normalizeRange(range, tDateProfile, dateEnv) {
159
157
  if (!tDateProfile.isTimeScale) {
160
158
  range = common.computeVisibleDayRange(range);
161
159
  if (tDateProfile.largeUnit) {
162
- var dayRange = range; // preserve original result
160
+ let dayRange = range; // preserve original result
163
161
  range = {
164
162
  start: dateEnv.startOf(range.start, tDateProfile.largeUnit),
165
163
  end: dateEnv.startOf(range.end, tDateProfile.largeUnit),
@@ -182,19 +180,19 @@ function isValidDate(date, tDateProfile, dateProfile, dateProfileGenerator) {
182
180
  }
183
181
  if (tDateProfile.isTimeScale) {
184
182
  // determine if the time is within slotMinTime/slotMaxTime, which may have wacky values
185
- var day = common.startOfDay(date);
186
- var timeMs = date.valueOf() - day.valueOf();
187
- var ms = timeMs - common.asRoughMs(dateProfile.slotMinTime); // milliseconds since slotMinTime
183
+ let day = common.startOfDay(date);
184
+ let timeMs = date.valueOf() - day.valueOf();
185
+ let ms = timeMs - common.asRoughMs(dateProfile.slotMinTime); // milliseconds since slotMinTime
188
186
  ms = ((ms % 86400000) + 86400000) % 86400000; // make negative values wrap to 24hr clock
189
187
  return ms < tDateProfile.timeWindowMs; // before the slotMaxTime?
190
188
  }
191
189
  return true;
192
190
  }
193
191
  function validateLabelAndSlot(tDateProfile, dateProfile, dateEnv) {
194
- var currentRange = dateProfile.currentRange;
192
+ const { currentRange } = dateProfile;
195
193
  // make sure labelInterval doesn't exceed the max number of cells
196
194
  if (tDateProfile.labelInterval) {
197
- var labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.labelInterval);
195
+ const labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.labelInterval);
198
196
  if (labelCnt > common.config.MAX_TIMELINE_SLOTS) {
199
197
  console.warn('slotLabelInterval results in too many cells');
200
198
  tDateProfile.labelInterval = null;
@@ -202,7 +200,7 @@ function validateLabelAndSlot(tDateProfile, dateProfile, dateEnv) {
202
200
  }
203
201
  // make sure slotDuration doesn't exceed the maximum number of cells
204
202
  if (tDateProfile.slotDuration) {
205
- var slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.slotDuration);
203
+ const slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, tDateProfile.slotDuration);
206
204
  if (slotCnt > common.config.MAX_TIMELINE_SLOTS) {
207
205
  console.warn('slotDuration results in too many cells');
208
206
  tDateProfile.slotDuration = null;
@@ -210,7 +208,7 @@ function validateLabelAndSlot(tDateProfile, dateProfile, dateEnv) {
210
208
  }
211
209
  // make sure labelInterval is a multiple of slotDuration
212
210
  if (tDateProfile.labelInterval && tDateProfile.slotDuration) {
213
- var slotsPerLabel = common.wholeDivideDurations(tDateProfile.labelInterval, tDateProfile.slotDuration);
211
+ const slotsPerLabel = common.wholeDivideDurations(tDateProfile.labelInterval, tDateProfile.slotDuration);
214
212
  if (slotsPerLabel === null || slotsPerLabel < 1) {
215
213
  console.warn('slotLabelInterval must be a multiple of slotDuration');
216
214
  tDateProfile.slotDuration = null;
@@ -218,17 +216,16 @@ function validateLabelAndSlot(tDateProfile, dateProfile, dateEnv) {
218
216
  }
219
217
  }
220
218
  function ensureLabelInterval(tDateProfile, dateProfile, dateEnv) {
221
- var currentRange = dateProfile.currentRange;
222
- var labelInterval = tDateProfile.labelInterval;
219
+ const { currentRange } = dateProfile;
220
+ let { labelInterval } = tDateProfile;
223
221
  if (!labelInterval) {
224
222
  // compute based off the slot duration
225
223
  // find the largest label interval with an acceptable slots-per-label
226
- var input = void 0;
224
+ let input;
227
225
  if (tDateProfile.slotDuration) {
228
- for (var _i = 0, STOCK_SUB_DURATIONS_1 = STOCK_SUB_DURATIONS; _i < STOCK_SUB_DURATIONS_1.length; _i++) {
229
- input = STOCK_SUB_DURATIONS_1[_i];
230
- var tryLabelInterval = common.createDuration(input);
231
- var slotsPerLabel = common.wholeDivideDurations(tryLabelInterval, tDateProfile.slotDuration);
226
+ for (input of STOCK_SUB_DURATIONS) {
227
+ const tryLabelInterval = common.createDuration(input);
228
+ const slotsPerLabel = common.wholeDivideDurations(tryLabelInterval, tDateProfile.slotDuration);
232
229
  if (slotsPerLabel !== null && slotsPerLabel <= MAX_AUTO_SLOTS_PER_LABEL) {
233
230
  labelInterval = tryLabelInterval;
234
231
  break;
@@ -242,10 +239,9 @@ function ensureLabelInterval(tDateProfile, dateProfile, dateEnv) {
242
239
  // find the largest label interval that yields the minimum number of labels
243
240
  }
244
241
  else {
245
- for (var _a = 0, STOCK_SUB_DURATIONS_2 = STOCK_SUB_DURATIONS; _a < STOCK_SUB_DURATIONS_2.length; _a++) {
246
- input = STOCK_SUB_DURATIONS_2[_a];
242
+ for (input of STOCK_SUB_DURATIONS) {
247
243
  labelInterval = common.createDuration(input);
248
- var labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, labelInterval);
244
+ const labelCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, labelInterval);
249
245
  if (labelCnt >= MIN_AUTO_LABELS) {
250
246
  break;
251
247
  }
@@ -256,16 +252,15 @@ function ensureLabelInterval(tDateProfile, dateProfile, dateEnv) {
256
252
  return labelInterval;
257
253
  }
258
254
  function ensureSlotDuration(tDateProfile, dateProfile, dateEnv) {
259
- var currentRange = dateProfile.currentRange;
260
- var slotDuration = tDateProfile.slotDuration;
255
+ const { currentRange } = dateProfile;
256
+ let { slotDuration } = tDateProfile;
261
257
  if (!slotDuration) {
262
- var labelInterval = ensureLabelInterval(tDateProfile, dateProfile, dateEnv); // will compute if necessary
258
+ const labelInterval = ensureLabelInterval(tDateProfile, dateProfile, dateEnv); // will compute if necessary
263
259
  // compute based off the label interval
264
260
  // find the largest slot duration that is different from labelInterval, but still acceptable
265
- for (var _i = 0, STOCK_SUB_DURATIONS_3 = STOCK_SUB_DURATIONS; _i < STOCK_SUB_DURATIONS_3.length; _i++) {
266
- var input = STOCK_SUB_DURATIONS_3[_i];
267
- var trySlotDuration = common.createDuration(input);
268
- var slotsPerLabel = common.wholeDivideDurations(labelInterval, trySlotDuration);
261
+ for (let input of STOCK_SUB_DURATIONS) {
262
+ const trySlotDuration = common.createDuration(input);
263
+ const slotsPerLabel = common.wholeDivideDurations(labelInterval, trySlotDuration);
269
264
  if (slotsPerLabel !== null && slotsPerLabel > 1 && slotsPerLabel <= MAX_AUTO_SLOTS_PER_LABEL) {
270
265
  slotDuration = trySlotDuration;
271
266
  break;
@@ -273,7 +268,7 @@ function ensureSlotDuration(tDateProfile, dateProfile, dateEnv) {
273
268
  }
274
269
  // only allow the value if it won't exceed the view's # of slots limit
275
270
  if (slotDuration) {
276
- var slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, slotDuration);
271
+ const slotCnt = dateEnv.countDurationsBetween(currentRange.start, currentRange.end, slotDuration);
277
272
  if (slotCnt > MAX_AUTO_CELLS) {
278
273
  slotDuration = null;
279
274
  }
@@ -287,12 +282,12 @@ function ensureSlotDuration(tDateProfile, dateProfile, dateEnv) {
287
282
  return slotDuration;
288
283
  }
289
284
  function computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions) {
290
- var format1;
291
- var format2;
292
- var labelInterval = tDateProfile.labelInterval;
293
- var unit = common.greatestDurationDenominator(labelInterval).unit;
294
- var weekNumbersVisible = allOptions.weekNumbers;
295
- var format0 = (format1 = (format2 = null));
285
+ let format1;
286
+ let format2;
287
+ const { labelInterval } = tDateProfile;
288
+ let unit = common.greatestDurationDenominator(labelInterval).unit;
289
+ const weekNumbersVisible = allOptions.weekNumbers;
290
+ let format0 = (format1 = (format2 = null));
296
291
  // NOTE: weekNumber computation function wont work
297
292
  if ((unit === 'week') && !weekNumbersVisible) {
298
293
  unit = 'day';
@@ -346,8 +341,8 @@ function computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions) {
346
341
  hour: 'numeric',
347
342
  meridiem: 'short',
348
343
  };
349
- format1 = function (params) { return (':' + common.padStart(params.date.minute, 2) // ':30'
350
- ); };
344
+ format1 = (params) => (':' + common.padStart(params.date.minute, 2) // ':30'
345
+ );
351
346
  }
352
347
  else {
353
348
  format0 = {
@@ -361,8 +356,8 @@ function computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions) {
361
356
  // sufficiently large number of different second cells?
362
357
  if ((common.asRoughSeconds(labelInterval) / 60) >= MAX_AUTO_SLOTS_PER_LABEL) {
363
358
  format0 = { hour: 'numeric', minute: '2-digit', meridiem: 'lowercase' }; // '8:30 PM'
364
- format1 = function (params) { return (':' + common.padStart(params.date.second, 2) // ':30'
365
- ); };
359
+ format1 = (params) => (':' + common.padStart(params.date.second, 2) // ':30'
360
+ );
366
361
  }
367
362
  else {
368
363
  format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' }; // '8:30:45 PM'
@@ -370,7 +365,7 @@ function computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions) {
370
365
  break;
371
366
  case 'millisecond':
372
367
  format0 = { hour: 'numeric', minute: '2-digit', second: '2-digit', meridiem: 'lowercase' }; // '8:30:45 PM'
373
- format1 = function (params) { return ('.' + common.padStart(params.millisecond, 3)); };
368
+ format1 = (params) => ('.' + common.padStart(params.millisecond, 3));
374
369
  break;
375
370
  }
376
371
  return [].concat(format0 || [], format1 || [], format2 || []);
@@ -379,8 +374,8 @@ function computeHeaderFormats(tDateProfile, dateProfile, dateEnv, allOptions) {
379
374
  // Won't go more precise than days.
380
375
  // Will return `0` if there's not a clean whole interval.
381
376
  function currentRangeAs(unit, dateProfile, dateEnv) {
382
- var range = dateProfile.currentRange;
383
- var res = null;
377
+ let range = dateProfile.currentRange;
378
+ let res = null;
384
379
  if (unit === 'years') {
385
380
  res = dateEnv.diffWholeYears(range.start, range.end);
386
381
  }
@@ -396,42 +391,41 @@ function currentRangeAs(unit, dateProfile, dateEnv) {
396
391
  return res || 0;
397
392
  }
398
393
  function buildIsWeekStarts(tDateProfile, dateEnv) {
399
- var slotDates = tDateProfile.slotDates, emphasizeWeeks = tDateProfile.emphasizeWeeks;
400
- var prevWeekNumber = null;
401
- var isWeekStarts = [];
402
- for (var _i = 0, slotDates_1 = slotDates; _i < slotDates_1.length; _i++) {
403
- var slotDate = slotDates_1[_i];
404
- var weekNumber = dateEnv.computeWeekNumber(slotDate);
405
- var isWeekStart = emphasizeWeeks && (prevWeekNumber !== null) && (prevWeekNumber !== weekNumber);
394
+ let { slotDates, emphasizeWeeks } = tDateProfile;
395
+ let prevWeekNumber = null;
396
+ let isWeekStarts = [];
397
+ for (let slotDate of slotDates) {
398
+ let weekNumber = dateEnv.computeWeekNumber(slotDate);
399
+ let isWeekStart = emphasizeWeeks && (prevWeekNumber !== null) && (prevWeekNumber !== weekNumber);
406
400
  prevWeekNumber = weekNumber;
407
401
  isWeekStarts.push(isWeekStart);
408
402
  }
409
403
  return isWeekStarts;
410
404
  }
411
405
  function buildCellRows(tDateProfile, dateEnv) {
412
- var slotDates = tDateProfile.slotDates;
413
- var formats = tDateProfile.headerFormats;
414
- var cellRows = formats.map(function () { return []; }); // indexed by row,col
415
- var slotAsDays = common.asCleanDays(tDateProfile.slotDuration);
416
- var guessedSlotUnit = slotAsDays === 7 ? 'week' :
406
+ let slotDates = tDateProfile.slotDates;
407
+ let formats = tDateProfile.headerFormats;
408
+ let cellRows = formats.map(() => []); // indexed by row,col
409
+ let slotAsDays = common.asCleanDays(tDateProfile.slotDuration);
410
+ let guessedSlotUnit = slotAsDays === 7 ? 'week' :
417
411
  slotAsDays === 1 ? 'day' :
418
412
  null;
419
413
  // specifically for navclicks
420
- var rowUnitsFromFormats = formats.map(function (format) { return (format.getLargestUnit ? format.getLargestUnit() : null); });
414
+ let rowUnitsFromFormats = formats.map((format) => (format.getLargestUnit ? format.getLargestUnit() : null));
421
415
  // builds cellRows and slotCells
422
- for (var i = 0; i < slotDates.length; i += 1) {
423
- var date = slotDates[i];
424
- var isWeekStart = tDateProfile.isWeekStarts[i];
425
- for (var row = 0; row < formats.length; row += 1) {
426
- var format = formats[row];
427
- var rowCells = cellRows[row];
428
- var leadingCell = rowCells[rowCells.length - 1];
429
- var isLastRow = row === formats.length - 1;
430
- var isSuperRow = formats.length > 1 && !isLastRow; // more than one row and not the last
431
- var newCell = null;
432
- var rowUnit = rowUnitsFromFormats[row] || (isLastRow ? guessedSlotUnit : null);
416
+ for (let i = 0; i < slotDates.length; i += 1) {
417
+ let date = slotDates[i];
418
+ let isWeekStart = tDateProfile.isWeekStarts[i];
419
+ for (let row = 0; row < formats.length; row += 1) {
420
+ let format = formats[row];
421
+ let rowCells = cellRows[row];
422
+ let leadingCell = rowCells[rowCells.length - 1];
423
+ let isLastRow = row === formats.length - 1;
424
+ let isSuperRow = formats.length > 1 && !isLastRow; // more than one row and not the last
425
+ let newCell = null;
426
+ let rowUnit = rowUnitsFromFormats[row] || (isLastRow ? guessedSlotUnit : null);
433
427
  if (isSuperRow) {
434
- var text = dateEnv.format(date, format);
428
+ let text = dateEnv.format(date, format);
435
429
  if (!leadingCell || (leadingCell.text !== text)) {
436
430
  newCell = buildCellObject(date, text, rowUnit);
437
431
  }
@@ -441,7 +435,7 @@ function buildCellRows(tDateProfile, dateEnv) {
441
435
  }
442
436
  else if (!leadingCell ||
443
437
  common.isInt(dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.labelInterval))) {
444
- var text = dateEnv.format(date, format);
438
+ let text = dateEnv.format(date, format);
445
439
  newCell = buildCellObject(date, text, rowUnit);
446
440
  }
447
441
  else {
@@ -456,20 +450,15 @@ function buildCellRows(tDateProfile, dateEnv) {
456
450
  return cellRows;
457
451
  }
458
452
  function buildCellObject(date, text, rowUnit) {
459
- return { date: date, text: text, rowUnit: rowUnit, colspan: 1, isWeekStart: false };
453
+ return { date, text, rowUnit, colspan: 1, isWeekStart: false };
460
454
  }
461
455
 
462
- var TimelineHeaderThInner = /** @class */ (function (_super) {
463
- tslib.__extends(TimelineHeaderThInner, _super);
464
- function TimelineHeaderThInner() {
465
- return _super !== null && _super.apply(this, arguments) || this;
466
- }
467
- TimelineHeaderThInner.prototype.render = function () {
468
- var _a = this, props = _a.props, context = _a.context;
469
- return (common.createElement(common.ContentHook, { hookProps: props.hookProps, content: context.options.slotLabelContent, defaultContent: renderInnerContent }, function (innerElRef, innerContent) { return (common.createElement("a", tslib.__assign({ ref: innerElRef, className: 'fc-timeline-slot-cushion fc-scrollgrid-sync-inner' + (props.isSticky ? ' fc-sticky' : '') }, props.navLinkAttrs), innerContent)); }));
470
- };
471
- return TimelineHeaderThInner;
472
- }(common.BaseComponent));
456
+ class TimelineHeaderThInner extends common.BaseComponent {
457
+ render() {
458
+ let { props, context } = this;
459
+ return (common.createElement(common.ContentHook, { hookProps: props.hookProps, content: context.options.slotLabelContent, defaultContent: renderInnerContent }, (innerElRef, innerContent) => (common.createElement("a", Object.assign({ ref: innerElRef, className: 'fc-timeline-slot-cushion fc-scrollgrid-sync-inner' + (props.isSticky ? ' fc-sticky' : '') }, props.navLinkAttrs), innerContent))));
460
+ }
461
+ }
473
462
  function renderInnerContent(props) {
474
463
  return props.text;
475
464
  }
@@ -482,74 +471,65 @@ function refineHookProps(input) {
482
471
  };
483
472
  }
484
473
 
485
- var TimelineHeaderTh = /** @class */ (function (_super) {
486
- tslib.__extends(TimelineHeaderTh, _super);
487
- function TimelineHeaderTh() {
488
- var _this = _super !== null && _super.apply(this, arguments) || this;
489
- _this.refineHookProps = common.memoizeObjArg(refineHookProps);
490
- _this.normalizeClassNames = common.buildClassNameNormalizer();
491
- _this.buildCellNavLinkAttrs = common.memoize(buildCellNavLinkAttrs);
492
- return _this;
493
- }
494
- TimelineHeaderTh.prototype.render = function () {
495
- var _this = this;
496
- var _a = this, props = _a.props, context = _a.context;
497
- var dateEnv = context.dateEnv, options = context.options;
498
- var cell = props.cell, dateProfile = props.dateProfile, tDateProfile = props.tDateProfile;
474
+ class TimelineHeaderTh extends common.BaseComponent {
475
+ constructor() {
476
+ super(...arguments);
477
+ this.refineHookProps = common.memoizeObjArg(refineHookProps);
478
+ this.normalizeClassNames = common.buildClassNameNormalizer();
479
+ this.buildCellNavLinkAttrs = common.memoize(buildCellNavLinkAttrs);
480
+ }
481
+ render() {
482
+ let { props, context } = this;
483
+ let { dateEnv, options } = context;
484
+ let { cell, dateProfile, tDateProfile } = props;
499
485
  // the cell.rowUnit is f'd
500
486
  // giving 'month' for a 3-day view
501
487
  // workaround: to infer day, do NOT time
502
- var dateMeta = common.getDateMeta(cell.date, props.todayRange, props.nowDate, dateProfile);
503
- var classNames = ['fc-timeline-slot', 'fc-timeline-slot-label'].concat(cell.rowUnit === 'time' // TODO: so slot classnames for week/month/bigger. see note above about rowUnit
488
+ let dateMeta = common.getDateMeta(cell.date, props.todayRange, props.nowDate, dateProfile);
489
+ let classNames = ['fc-timeline-slot', 'fc-timeline-slot-label'].concat(cell.rowUnit === 'time' // TODO: so slot classnames for week/month/bigger. see note above about rowUnit
504
490
  ? common.getSlotClassNames(dateMeta, context.theme)
505
491
  : common.getDayClassNames(dateMeta, context.theme));
506
492
  if (cell.isWeekStart) {
507
493
  classNames.push('fc-timeline-slot-em');
508
494
  }
509
- var hookProps = this.refineHookProps({
495
+ let hookProps = this.refineHookProps({
510
496
  level: props.rowLevel,
511
497
  dateMarker: cell.date,
512
498
  text: cell.text,
513
499
  dateEnv: context.dateEnv,
514
500
  viewApi: context.viewApi,
515
501
  });
516
- var customClassNames = this.normalizeClassNames(options.slotLabelClassNames, hookProps);
517
- return (common.createElement(common.MountHook, { hookProps: hookProps, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, function (rootElRef) { return (common.createElement("th", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-date": dateEnv.formatIso(cell.date, { omitTime: !tDateProfile.isTimeScale, omitTimeZoneOffset: true }), colSpan: cell.colspan },
502
+ let customClassNames = this.normalizeClassNames(options.slotLabelClassNames, hookProps);
503
+ return (common.createElement(common.MountHook, { hookProps: hookProps, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, (rootElRef) => (common.createElement("th", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-date": dateEnv.formatIso(cell.date, { omitTime: !tDateProfile.isTimeScale, omitTimeZoneOffset: true }), colSpan: cell.colspan },
518
504
  common.createElement("div", { className: "fc-timeline-slot-frame", style: { height: props.rowInnerHeight } },
519
- common.createElement(TimelineHeaderThInner, { hookProps: hookProps, isSticky: props.isSticky, navLinkAttrs: _this.buildCellNavLinkAttrs(context, cell.date, cell.rowUnit) })))); }));
520
- };
521
- return TimelineHeaderTh;
522
- }(common.BaseComponent));
505
+ common.createElement(TimelineHeaderThInner, { hookProps: hookProps, isSticky: props.isSticky, navLinkAttrs: this.buildCellNavLinkAttrs(context, cell.date, cell.rowUnit) }))))));
506
+ }
507
+ }
523
508
  function buildCellNavLinkAttrs(context, cellDate, rowUnit) {
524
509
  return (rowUnit && rowUnit !== 'time')
525
510
  ? common.buildNavLinkAttrs(context, cellDate, rowUnit)
526
511
  : {};
527
512
  }
528
513
 
529
- var TimelineHeaderRows = /** @class */ (function (_super) {
530
- tslib.__extends(TimelineHeaderRows, _super);
531
- function TimelineHeaderRows() {
532
- return _super !== null && _super.apply(this, arguments) || this;
533
- }
534
- TimelineHeaderRows.prototype.render = function () {
535
- var _a = this.props, dateProfile = _a.dateProfile, tDateProfile = _a.tDateProfile, rowInnerHeights = _a.rowInnerHeights, todayRange = _a.todayRange, nowDate = _a.nowDate;
536
- var cellRows = tDateProfile.cellRows;
537
- return (common.createElement(common.Fragment, null, cellRows.map(function (rowCells, rowLevel) {
538
- var isLast = rowLevel === cellRows.length - 1;
539
- var isChrono = tDateProfile.isTimeScale && isLast; // the final row, with times?
540
- var classNames = [
514
+ class TimelineHeaderRows extends common.BaseComponent {
515
+ render() {
516
+ let { dateProfile, tDateProfile, rowInnerHeights, todayRange, nowDate } = this.props;
517
+ let { cellRows } = tDateProfile;
518
+ return (common.createElement(common.Fragment, null, cellRows.map((rowCells, rowLevel) => {
519
+ let isLast = rowLevel === cellRows.length - 1;
520
+ let isChrono = tDateProfile.isTimeScale && isLast; // the final row, with times?
521
+ let classNames = [
541
522
  'fc-timeline-header-row',
542
523
  isChrono ? 'fc-timeline-header-row-chrono' : '',
543
524
  ];
544
525
  return ( // eslint-disable-next-line react/no-array-index-key
545
- common.createElement("tr", { key: rowLevel, className: classNames.join(' ') }, rowCells.map(function (cell) { return (common.createElement(TimelineHeaderTh, { key: cell.date.toISOString(), cell: cell, rowLevel: rowLevel, dateProfile: dateProfile, tDateProfile: tDateProfile, todayRange: todayRange, nowDate: nowDate, rowInnerHeight: rowInnerHeights && rowInnerHeights[rowLevel], isSticky: !isLast })); })));
526
+ common.createElement("tr", { key: rowLevel, className: classNames.join(' ') }, rowCells.map((cell) => (common.createElement(TimelineHeaderTh, { key: cell.date.toISOString(), cell: cell, rowLevel: rowLevel, dateProfile: dateProfile, tDateProfile: tDateProfile, todayRange: todayRange, nowDate: nowDate, rowInnerHeight: rowInnerHeights && rowInnerHeights[rowLevel], isSticky: !isLast })))));
546
527
  })));
547
- };
548
- return TimelineHeaderRows;
549
- }(common.BaseComponent));
528
+ }
529
+ }
550
530
 
551
- var TimelineCoords = /** @class */ (function () {
552
- function TimelineCoords(slatRootEl, // okay to expose?
531
+ class TimelineCoords {
532
+ constructor(slatRootEl, // okay to expose?
553
533
  slatEls, dateProfile, tDateProfile, dateEnv, isRtl) {
554
534
  this.slatRootEl = slatRootEl;
555
535
  this.dateProfile = dateProfile;
@@ -563,36 +543,36 @@ var TimelineCoords = /** @class */ (function () {
563
543
  this.innerCoordCache = new common.PositionCache(slatRootEl, common.findDirectChildren(slatEls, 'div'), true, // isHorizontal
564
544
  false);
565
545
  }
566
- TimelineCoords.prototype.isDateInRange = function (date) {
546
+ isDateInRange(date) {
567
547
  return common.rangeContainsMarker(this.dateProfile.currentRange, date);
568
- };
548
+ }
569
549
  // results range from negative width of area to 0
570
- TimelineCoords.prototype.dateToCoord = function (date) {
571
- var tDateProfile = this.tDateProfile;
572
- var snapCoverage = this.computeDateSnapCoverage(date);
573
- var slotCoverage = snapCoverage / tDateProfile.snapsPerSlot;
574
- var slotIndex = Math.floor(slotCoverage);
550
+ dateToCoord(date) {
551
+ let { tDateProfile } = this;
552
+ let snapCoverage = this.computeDateSnapCoverage(date);
553
+ let slotCoverage = snapCoverage / tDateProfile.snapsPerSlot;
554
+ let slotIndex = Math.floor(slotCoverage);
575
555
  slotIndex = Math.min(slotIndex, tDateProfile.slotCnt - 1);
576
- var partial = slotCoverage - slotIndex;
577
- var _a = this, innerCoordCache = _a.innerCoordCache, outerCoordCache = _a.outerCoordCache;
556
+ let partial = slotCoverage - slotIndex;
557
+ let { innerCoordCache, outerCoordCache } = this;
578
558
  if (this.isRtl) {
579
559
  return outerCoordCache.originClientRect.width - (outerCoordCache.rights[slotIndex] -
580
560
  (innerCoordCache.getWidth(slotIndex) * partial));
581
561
  }
582
562
  return (outerCoordCache.lefts[slotIndex] +
583
563
  (innerCoordCache.getWidth(slotIndex) * partial));
584
- };
585
- TimelineCoords.prototype.rangeToCoords = function (range) {
564
+ }
565
+ rangeToCoords(range) {
586
566
  return {
587
567
  start: this.dateToCoord(range.start),
588
568
  end: this.dateToCoord(range.end),
589
569
  };
590
- };
591
- TimelineCoords.prototype.durationToCoord = function (duration) {
592
- var _a = this, dateProfile = _a.dateProfile, tDateProfile = _a.tDateProfile, dateEnv = _a.dateEnv, isRtl = _a.isRtl;
593
- var coord = 0;
570
+ }
571
+ durationToCoord(duration) {
572
+ let { dateProfile, tDateProfile, dateEnv, isRtl } = this;
573
+ let coord = 0;
594
574
  if (dateProfile) {
595
- var date = dateEnv.add(dateProfile.activeRange.start, duration);
575
+ let date = dateEnv.add(dateProfile.activeRange.start, duration);
596
576
  if (!tDateProfile.isTimeScale) {
597
577
  date = common.startOfDay(date);
598
578
  }
@@ -603,30 +583,29 @@ var TimelineCoords = /** @class */ (function () {
603
583
  }
604
584
  }
605
585
  return coord;
606
- };
607
- TimelineCoords.prototype.coordFromLeft = function (coord) {
586
+ }
587
+ coordFromLeft(coord) {
608
588
  if (this.isRtl) {
609
589
  return this.outerCoordCache.originClientRect.width - coord;
610
590
  }
611
591
  return coord;
612
- };
592
+ }
613
593
  // returned value is between 0 and the number of snaps
614
- TimelineCoords.prototype.computeDateSnapCoverage = function (date) {
594
+ computeDateSnapCoverage(date) {
615
595
  return computeDateSnapCoverage(date, this.tDateProfile, this.dateEnv);
616
- };
617
- return TimelineCoords;
618
- }());
596
+ }
597
+ }
619
598
  // returned value is between 0 and the number of snaps
620
599
  function computeDateSnapCoverage(date, tDateProfile, dateEnv) {
621
- var snapDiff = dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.snapDuration);
600
+ let snapDiff = dateEnv.countDurationsBetween(tDateProfile.normalizedRange.start, date, tDateProfile.snapDuration);
622
601
  if (snapDiff < 0) {
623
602
  return 0;
624
603
  }
625
604
  if (snapDiff >= tDateProfile.snapDiffToIndex.length) {
626
605
  return tDateProfile.snapCnt;
627
606
  }
628
- var snapDiffInt = Math.floor(snapDiff);
629
- var snapCoverage = tDateProfile.snapDiffToIndex[snapDiffInt];
607
+ let snapDiffInt = Math.floor(snapDiff);
608
+ let snapCoverage = tDateProfile.snapDiffToIndex[snapDiffInt];
630
609
  if (common.isInt(snapCoverage)) { // not an in-between value
631
610
  snapCoverage += snapDiff - snapDiffInt; // add the remainder
632
611
  }
@@ -656,22 +635,19 @@ function coordsToCss(hcoords, isRtl) {
656
635
  return { left: hcoords.start, right: -hcoords.end };
657
636
  }
658
637
 
659
- var TimelineHeader = /** @class */ (function (_super) {
660
- tslib.__extends(TimelineHeader, _super);
661
- function TimelineHeader() {
662
- var _this = _super !== null && _super.apply(this, arguments) || this;
663
- _this.rootElRef = common.createRef();
664
- return _this;
665
- }
666
- TimelineHeader.prototype.render = function () {
667
- var _this = this;
668
- var _a = this, props = _a.props, context = _a.context;
638
+ class TimelineHeader extends common.BaseComponent {
639
+ constructor() {
640
+ super(...arguments);
641
+ this.rootElRef = common.createRef();
642
+ }
643
+ render() {
644
+ let { props, context } = this;
669
645
  // TODO: very repetitive
670
646
  // TODO: make part of tDateProfile?
671
- var timerUnit = common.greatestDurationDenominator(props.tDateProfile.slotDuration).unit;
647
+ let timerUnit = common.greatestDurationDenominator(props.tDateProfile.slotDuration).unit;
672
648
  // WORKAROUND: make ignore slatCoords when out of sync with dateProfile
673
- var slatCoords = props.slatCoords && props.slatCoords.dateProfile === props.dateProfile ? props.slatCoords : null;
674
- return (common.createElement(common.NowTimer, { unit: timerUnit }, function (nowDate, todayRange) { return (common.createElement("div", { className: "fc-timeline-header", ref: _this.rootElRef },
649
+ let slatCoords = props.slatCoords && props.slatCoords.dateProfile === props.dateProfile ? props.slatCoords : null;
650
+ return (common.createElement(common.NowTimer, { unit: timerUnit }, (nowDate, todayRange) => (common.createElement("div", { className: "fc-timeline-header", ref: this.rootElRef },
675
651
  common.createElement("table", { "aria-hidden": true, className: "fc-scrollgrid-sync-table", style: { minWidth: props.tableMinWidth, width: props.clientWidth } },
676
652
  props.tableColGroupNode,
677
653
  common.createElement("tbody", null,
@@ -680,38 +656,33 @@ var TimelineHeader = /** @class */ (function (_super) {
680
656
  // need to have a container regardless of whether the current view has a visible now indicator
681
657
  // because apparently removal of the element resets the scroll for some reasons (issue #5351).
682
658
  // this issue doesn't happen for the timeline body however (
683
- common.createElement("div", { className: "fc-timeline-now-indicator-container" }, (slatCoords && slatCoords.isDateInRange(nowDate)) && (common.createElement(common.NowIndicatorRoot, { isAxis: true, date: nowDate }, function (rootElRef, classNames, innerElRef, innerContent) { return (common.createElement("div", { ref: rootElRef, className: ['fc-timeline-now-indicator-arrow'].concat(classNames).join(' '), style: coordToCss(slatCoords.dateToCoord(nowDate), context.isRtl) }, innerContent)); })))))); }));
684
- };
685
- TimelineHeader.prototype.componentDidMount = function () {
659
+ common.createElement("div", { className: "fc-timeline-now-indicator-container" }, (slatCoords && slatCoords.isDateInRange(nowDate)) && (common.createElement(common.NowIndicatorRoot, { isAxis: true, date: nowDate }, (rootElRef, classNames, innerElRef, innerContent) => (common.createElement("div", { ref: rootElRef, className: ['fc-timeline-now-indicator-arrow'].concat(classNames).join(' '), style: coordToCss(slatCoords.dateToCoord(nowDate), context.isRtl) }, innerContent))))))))));
660
+ }
661
+ componentDidMount() {
686
662
  this.updateSize();
687
- };
688
- TimelineHeader.prototype.componentDidUpdate = function () {
663
+ }
664
+ componentDidUpdate() {
689
665
  this.updateSize();
690
- };
691
- TimelineHeader.prototype.updateSize = function () {
666
+ }
667
+ updateSize() {
692
668
  if (this.props.onMaxCushionWidth) {
693
669
  this.props.onMaxCushionWidth(this.computeMaxCushionWidth());
694
670
  }
695
- };
696
- TimelineHeader.prototype.computeMaxCushionWidth = function () {
697
- return Math.max.apply(Math, common.findElements(this.rootElRef.current, '.fc-timeline-header-row:last-child .fc-timeline-slot-cushion').map(function (el) { return el.getBoundingClientRect().width; }));
698
- };
699
- return TimelineHeader;
700
- }(common.BaseComponent));
671
+ }
672
+ computeMaxCushionWidth() {
673
+ return Math.max(...common.findElements(this.rootElRef.current, '.fc-timeline-header-row:last-child .fc-timeline-slot-cushion').map((el) => el.getBoundingClientRect().width));
674
+ }
675
+ }
701
676
 
702
- var TimelineSlatCell = /** @class */ (function (_super) {
703
- tslib.__extends(TimelineSlatCell, _super);
704
- function TimelineSlatCell() {
705
- return _super !== null && _super.apply(this, arguments) || this;
706
- }
707
- TimelineSlatCell.prototype.render = function () {
708
- var _a = this, props = _a.props, context = _a.context;
709
- var dateEnv = context.dateEnv, options = context.options, theme = context.theme;
710
- var date = props.date, tDateProfile = props.tDateProfile, isEm = props.isEm;
711
- var dateMeta = common.getDateMeta(props.date, props.todayRange, props.nowDate, props.dateProfile);
712
- var classNames = ['fc-timeline-slot', 'fc-timeline-slot-lane'];
713
- var dataAttrs = { 'data-date': dateEnv.formatIso(date, { omitTimeZoneOffset: true, omitTime: !tDateProfile.isTimeScale }) };
714
- var hookProps = tslib.__assign(tslib.__assign({ date: dateEnv.toDate(props.date) }, dateMeta), { view: context.viewApi });
677
+ class TimelineSlatCell extends common.BaseComponent {
678
+ render() {
679
+ let { props, context } = this;
680
+ let { dateEnv, options, theme } = context;
681
+ let { date, tDateProfile, isEm } = props;
682
+ let dateMeta = common.getDateMeta(props.date, props.todayRange, props.nowDate, props.dateProfile);
683
+ let classNames = ['fc-timeline-slot', 'fc-timeline-slot-lane'];
684
+ let dataAttrs = { 'data-date': dateEnv.formatIso(date, { omitTimeZoneOffset: true, omitTime: !tDateProfile.isTimeScale }) };
685
+ let hookProps = Object.assign(Object.assign({ date: dateEnv.toDate(props.date) }, dateMeta), { view: context.viewApi });
715
686
  if (isEm) {
716
687
  classNames.push('fc-timeline-slot-em');
717
688
  }
@@ -720,56 +691,48 @@ var TimelineSlatCell = /** @class */ (function (_super) {
720
691
  'fc-timeline-slot-major' :
721
692
  'fc-timeline-slot-minor');
722
693
  }
723
- classNames.push.apply(classNames, (props.isDay
694
+ classNames.push(...(props.isDay
724
695
  ? common.getDayClassNames(dateMeta, theme)
725
696
  : common.getSlotClassNames(dateMeta, theme)));
726
- return (common.createElement(common.RenderHook, { hookProps: hookProps, classNames: options.slotLaneClassNames, content: options.slotLaneContent, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount, elRef: props.elRef }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (common.createElement("td", tslib.__assign({ ref: rootElRef, className: classNames.concat(customClassNames).join(' ') }, dataAttrs),
727
- common.createElement("div", { ref: innerElRef }, innerContent))); }));
728
- };
729
- return TimelineSlatCell;
730
- }(common.BaseComponent));
697
+ return (common.createElement(common.RenderHook, { hookProps: hookProps, classNames: options.slotLaneClassNames, content: options.slotLaneContent, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount, elRef: props.elRef }, (rootElRef, customClassNames, innerElRef, innerContent) => (common.createElement("td", Object.assign({ ref: rootElRef, className: classNames.concat(customClassNames).join(' ') }, dataAttrs),
698
+ common.createElement("div", { ref: innerElRef }, innerContent)))));
699
+ }
700
+ }
731
701
 
732
- var TimelineSlatsBody = /** @class */ (function (_super) {
733
- tslib.__extends(TimelineSlatsBody, _super);
734
- function TimelineSlatsBody() {
735
- return _super !== null && _super.apply(this, arguments) || this;
736
- }
737
- TimelineSlatsBody.prototype.render = function () {
738
- var props = this.props;
739
- var tDateProfile = props.tDateProfile, cellElRefs = props.cellElRefs;
740
- var slotDates = tDateProfile.slotDates, isWeekStarts = tDateProfile.isWeekStarts;
741
- var isDay = !tDateProfile.isTimeScale && !tDateProfile.largeUnit;
702
+ class TimelineSlatsBody extends common.BaseComponent {
703
+ render() {
704
+ let { props } = this;
705
+ let { tDateProfile, cellElRefs } = props;
706
+ let { slotDates, isWeekStarts } = tDateProfile;
707
+ let isDay = !tDateProfile.isTimeScale && !tDateProfile.largeUnit;
742
708
  return (common.createElement("tbody", null,
743
- common.createElement("tr", null, slotDates.map(function (slotDate, i) {
744
- var key = slotDate.toISOString();
709
+ common.createElement("tr", null, slotDates.map((slotDate, i) => {
710
+ let key = slotDate.toISOString();
745
711
  return (common.createElement(TimelineSlatCell, { key: key, elRef: cellElRefs.createRef(key), date: slotDate, dateProfile: props.dateProfile, tDateProfile: tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isEm: isWeekStarts[i], isDay: isDay }));
746
712
  }))));
747
- };
748
- return TimelineSlatsBody;
749
- }(common.BaseComponent));
713
+ }
714
+ }
750
715
 
751
- var TimelineSlats = /** @class */ (function (_super) {
752
- tslib.__extends(TimelineSlats, _super);
753
- function TimelineSlats() {
754
- var _this = _super !== null && _super.apply(this, arguments) || this;
755
- _this.rootElRef = common.createRef();
756
- _this.cellElRefs = new common.RefMap();
757
- _this.handleScrollRequest = function (request) {
758
- var onScrollLeftRequest = _this.props.onScrollLeftRequest;
759
- var coords = _this.coords;
716
+ class TimelineSlats extends common.BaseComponent {
717
+ constructor() {
718
+ super(...arguments);
719
+ this.rootElRef = common.createRef();
720
+ this.cellElRefs = new common.RefMap();
721
+ this.handleScrollRequest = (request) => {
722
+ let { onScrollLeftRequest } = this.props;
723
+ let { coords } = this;
760
724
  if (onScrollLeftRequest && coords) {
761
725
  if (request.time) {
762
- var scrollLeft = coords.coordFromLeft(coords.durationToCoord(request.time));
726
+ let scrollLeft = coords.coordFromLeft(coords.durationToCoord(request.time));
763
727
  onScrollLeftRequest(scrollLeft);
764
728
  }
765
729
  return true;
766
730
  }
767
731
  return null; // best?
768
732
  };
769
- return _this;
770
733
  }
771
- TimelineSlats.prototype.render = function () {
772
- var _a = this, props = _a.props, context = _a.context;
734
+ render() {
735
+ let { props, context } = this;
773
736
  return (common.createElement("div", { className: "fc-timeline-slots", ref: this.rootElRef },
774
737
  common.createElement("table", { "aria-hidden": true, className: context.theme.getClass('table'), style: {
775
738
  minWidth: props.tableMinWidth,
@@ -777,28 +740,28 @@ var TimelineSlats = /** @class */ (function (_super) {
777
740
  } },
778
741
  props.tableColGroupNode,
779
742
  common.createElement(TimelineSlatsBody, { cellElRefs: this.cellElRefs, dateProfile: props.dateProfile, tDateProfile: props.tDateProfile, nowDate: props.nowDate, todayRange: props.todayRange }))));
780
- };
781
- TimelineSlats.prototype.componentDidMount = function () {
743
+ }
744
+ componentDidMount() {
782
745
  this.updateSizing();
783
746
  this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest);
784
- };
785
- TimelineSlats.prototype.componentDidUpdate = function (prevProps) {
747
+ }
748
+ componentDidUpdate(prevProps) {
786
749
  this.updateSizing();
787
750
  this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile);
788
- };
789
- TimelineSlats.prototype.componentWillUnmount = function () {
751
+ }
752
+ componentWillUnmount() {
790
753
  this.scrollResponder.detach();
791
754
  if (this.props.onCoords) {
792
755
  this.props.onCoords(null);
793
756
  }
794
- };
795
- TimelineSlats.prototype.updateSizing = function () {
796
- var _a = this, props = _a.props, context = _a.context;
757
+ }
758
+ updateSizing() {
759
+ let { props, context } = this;
797
760
  if (props.clientWidth !== null && // is sizing stable?
798
761
  this.scrollResponder
799
762
  // ^it's possible to have clientWidth immediately after mount (when returning from print view), but w/o scrollResponder
800
763
  ) {
801
- var rootEl = this.rootElRef.current;
764
+ let rootEl = this.rootElRef.current;
802
765
  if (rootEl.offsetWidth) { // not hidden by css
803
766
  this.coords = new TimelineCoords(this.rootElRef.current, collectCellEls(this.cellElRefs.currentMap, props.tDateProfile.slotDates), props.dateProfile, props.tDateProfile, context.dateEnv, context.isRtl);
804
767
  if (props.onCoords) {
@@ -807,24 +770,24 @@ var TimelineSlats = /** @class */ (function (_super) {
807
770
  this.scrollResponder.update(false); // TODO: wouldn't have to do this if coords were in state
808
771
  }
809
772
  }
810
- };
811
- TimelineSlats.prototype.positionToHit = function (leftPosition) {
812
- var outerCoordCache = this.coords.outerCoordCache;
813
- var _a = this.context, dateEnv = _a.dateEnv, isRtl = _a.isRtl;
814
- var tDateProfile = this.props.tDateProfile;
815
- var slatIndex = outerCoordCache.leftToIndex(leftPosition);
773
+ }
774
+ positionToHit(leftPosition) {
775
+ let { outerCoordCache } = this.coords;
776
+ let { dateEnv, isRtl } = this.context;
777
+ let { tDateProfile } = this.props;
778
+ let slatIndex = outerCoordCache.leftToIndex(leftPosition);
816
779
  if (slatIndex != null) {
817
780
  // somewhat similar to what TimeGrid does. consolidate?
818
- var slatWidth = outerCoordCache.getWidth(slatIndex);
819
- var partial = isRtl ?
781
+ let slatWidth = outerCoordCache.getWidth(slatIndex);
782
+ let partial = isRtl ?
820
783
  (outerCoordCache.rights[slatIndex] - leftPosition) / slatWidth :
821
784
  (leftPosition - outerCoordCache.lefts[slatIndex]) / slatWidth;
822
- var localSnapIndex = Math.floor(partial * tDateProfile.snapsPerSlot);
823
- var start = dateEnv.add(tDateProfile.slotDates[slatIndex], common.multiplyDuration(tDateProfile.snapDuration, localSnapIndex));
824
- var end = dateEnv.add(start, tDateProfile.snapDuration);
785
+ let localSnapIndex = Math.floor(partial * tDateProfile.snapsPerSlot);
786
+ let start = dateEnv.add(tDateProfile.slotDates[slatIndex], common.multiplyDuration(tDateProfile.snapDuration, localSnapIndex));
787
+ let end = dateEnv.add(start, tDateProfile.snapDuration);
825
788
  return {
826
789
  dateSpan: {
827
- range: { start: start, end: end },
790
+ range: { start, end },
828
791
  allDay: !this.props.tDateProfile.isTimeScale,
829
792
  },
830
793
  dayEl: this.cellElRefs.currentMap[slatIndex],
@@ -833,28 +796,26 @@ var TimelineSlats = /** @class */ (function (_super) {
833
796
  };
834
797
  }
835
798
  return null;
836
- };
837
- return TimelineSlats;
838
- }(common.BaseComponent));
799
+ }
800
+ }
839
801
  function collectCellEls(elMap, slotDates) {
840
- return slotDates.map(function (slotDate) {
841
- var key = slotDate.toISOString();
802
+ return slotDates.map((slotDate) => {
803
+ let key = slotDate.toISOString();
842
804
  return elMap[key];
843
805
  });
844
806
  }
845
807
 
846
808
  function computeSegHCoords(segs, minWidth, timelineCoords) {
847
- var hcoords = [];
809
+ let hcoords = [];
848
810
  if (timelineCoords) {
849
- for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {
850
- var seg = segs_1[_i];
851
- var res = timelineCoords.rangeToCoords(seg);
852
- var start = Math.round(res.start); // for barely-overlapping collisions
853
- var end = Math.round(res.end); //
811
+ for (let seg of segs) {
812
+ let res = timelineCoords.rangeToCoords(seg);
813
+ let start = Math.round(res.start); // for barely-overlapping collisions
814
+ let end = Math.round(res.end); //
854
815
  if (end - start < minWidth) {
855
816
  end = start + minWidth;
856
817
  }
857
- hcoords.push({ start: start, end: end });
818
+ hcoords.push({ start, end });
858
819
  }
859
820
  }
860
821
  return hcoords;
@@ -863,13 +824,13 @@ function computeFgSegPlacements(segs, segHCoords, // might not have for every se
863
824
  eventInstanceHeights, // might not have for every seg
864
825
  moreLinkHeights, // might not have for every more-link
865
826
  strictOrder, maxStackCnt) {
866
- var segInputs = [];
867
- var crudePlacements = []; // when we don't know dims
868
- for (var i = 0; i < segs.length; i += 1) {
869
- var seg = segs[i];
870
- var instanceId = seg.eventRange.instance.instanceId;
871
- var height = eventInstanceHeights[instanceId];
872
- var hcoords = segHCoords[i];
827
+ let segInputs = [];
828
+ let crudePlacements = []; // when we don't know dims
829
+ for (let i = 0; i < segs.length; i += 1) {
830
+ let seg = segs[i];
831
+ let instanceId = seg.eventRange.instance.instanceId;
832
+ let height = eventInstanceHeights[instanceId];
833
+ let hcoords = segHCoords[i];
873
834
  if (height && hcoords) {
874
835
  segInputs.push({
875
836
  index: i,
@@ -879,33 +840,33 @@ strictOrder, maxStackCnt) {
879
840
  }
880
841
  else {
881
842
  crudePlacements.push({
882
- seg: seg,
883
- hcoords: hcoords,
843
+ seg,
844
+ hcoords,
884
845
  top: null,
885
846
  });
886
847
  }
887
848
  }
888
- var hierarchy = new common.SegHierarchy();
849
+ let hierarchy = new common.SegHierarchy();
889
850
  if (strictOrder != null) {
890
851
  hierarchy.strictOrder = strictOrder;
891
852
  }
892
853
  if (maxStackCnt != null) {
893
854
  hierarchy.maxStackCnt = maxStackCnt;
894
855
  }
895
- var hiddenEntries = hierarchy.addSegs(segInputs);
896
- var hiddenPlacements = hiddenEntries.map(function (entry) { return ({
856
+ let hiddenEntries = hierarchy.addSegs(segInputs);
857
+ let hiddenPlacements = hiddenEntries.map((entry) => ({
897
858
  seg: segs[entry.index],
898
859
  hcoords: entry.span,
899
860
  top: null,
900
- }); });
901
- var hiddenGroups = common.groupIntersectingEntries(hiddenEntries);
902
- var moreLinkInputs = [];
903
- var moreLinkCrudePlacements = [];
904
- var extractSeg = function (entry) { return segs[entry.index]; };
905
- for (var i = 0; i < hiddenGroups.length; i += 1) {
906
- var hiddenGroup = hiddenGroups[i];
907
- var sortedSegs = hiddenGroup.entries.map(extractSeg);
908
- var height = moreLinkHeights[common.buildIsoString(common.computeEarliestSegStart(sortedSegs))]; // not optimal :(
861
+ }));
862
+ let hiddenGroups = common.groupIntersectingEntries(hiddenEntries);
863
+ let moreLinkInputs = [];
864
+ let moreLinkCrudePlacements = [];
865
+ const extractSeg = (entry) => segs[entry.index];
866
+ for (let i = 0; i < hiddenGroups.length; i += 1) {
867
+ let hiddenGroup = hiddenGroups[i];
868
+ let sortedSegs = hiddenGroup.entries.map(extractSeg);
869
+ let height = moreLinkHeights[common.buildIsoString(common.computeEarliestSegStart(sortedSegs))]; // not optimal :(
909
870
  if (height != null) {
910
871
  // NOTE: the hiddenGroup's spanStart/spanEnd are already computed by rangeToCoords. computed during input.
911
872
  moreLinkInputs.push({
@@ -925,12 +886,11 @@ strictOrder, maxStackCnt) {
925
886
  // add more-links into the hierarchy, but don't limit
926
887
  hierarchy.maxStackCnt = -1;
927
888
  hierarchy.addSegs(moreLinkInputs);
928
- var visibleRects = hierarchy.toRects();
929
- var visiblePlacements = [];
930
- var maxHeight = 0;
931
- for (var _i = 0, visibleRects_1 = visibleRects; _i < visibleRects_1.length; _i++) {
932
- var rect = visibleRects_1[_i];
933
- var segIndex = rect.index;
889
+ let visibleRects = hierarchy.toRects();
890
+ let visiblePlacements = [];
891
+ let maxHeight = 0;
892
+ for (let rect of visibleRects) {
893
+ let segIndex = rect.index;
934
894
  visiblePlacements.push({
935
895
  seg: segIndex < segs.length
936
896
  ? segs[segIndex] // a real seg
@@ -946,48 +906,39 @@ strictOrder, maxStackCnt) {
946
906
  ];
947
907
  }
948
908
 
949
- var TimelineLaneBg = /** @class */ (function (_super) {
950
- tslib.__extends(TimelineLaneBg, _super);
951
- function TimelineLaneBg() {
952
- return _super !== null && _super.apply(this, arguments) || this;
953
- }
954
- TimelineLaneBg.prototype.render = function () {
955
- var props = this.props;
956
- var highlightSeg = [].concat(props.eventResizeSegs, props.dateSelectionSegs);
909
+ class TimelineLaneBg extends common.BaseComponent {
910
+ render() {
911
+ let { props } = this;
912
+ let highlightSeg = [].concat(props.eventResizeSegs, props.dateSelectionSegs);
957
913
  return props.timelineCoords && (common.createElement("div", { className: "fc-timeline-bg" },
958
914
  this.renderSegs(props.businessHourSegs || [], props.timelineCoords, 'non-business'),
959
915
  this.renderSegs(props.bgEventSegs || [], props.timelineCoords, 'bg-event'),
960
916
  this.renderSegs(highlightSeg, props.timelineCoords, 'highlight')));
961
- };
962
- TimelineLaneBg.prototype.renderSegs = function (segs, timelineCoords, fillType) {
963
- var _a = this.props, todayRange = _a.todayRange, nowDate = _a.nowDate;
964
- var isRtl = this.context.isRtl;
965
- var segHCoords = computeSegHCoords(segs, 0, timelineCoords);
966
- var children = segs.map(function (seg, i) {
967
- var hcoords = segHCoords[i];
968
- var hStyle = coordsToCss(hcoords, isRtl);
917
+ }
918
+ renderSegs(segs, timelineCoords, fillType) {
919
+ let { todayRange, nowDate } = this.props;
920
+ let { isRtl } = this.context;
921
+ let segHCoords = computeSegHCoords(segs, 0, timelineCoords);
922
+ let children = segs.map((seg, i) => {
923
+ let hcoords = segHCoords[i];
924
+ let hStyle = coordsToCss(hcoords, isRtl);
969
925
  return (common.createElement("div", { key: common.buildEventRangeKey(seg.eventRange), className: "fc-timeline-bg-harness", style: hStyle }, fillType === 'bg-event' ?
970
- common.createElement(common.BgEvent, tslib.__assign({ seg: seg }, common.getSegMeta(seg, todayRange, nowDate))) :
926
+ common.createElement(common.BgEvent, Object.assign({ seg: seg }, common.getSegMeta(seg, todayRange, nowDate))) :
971
927
  common.renderFill(fillType)));
972
928
  });
973
929
  return common.createElement(common.Fragment, null, children);
974
- };
975
- return TimelineLaneBg;
976
- }(common.BaseComponent));
930
+ }
931
+ }
977
932
 
978
- var TimelineLaneSlicer = /** @class */ (function (_super) {
979
- tslib.__extends(TimelineLaneSlicer, _super);
980
- function TimelineLaneSlicer() {
981
- return _super !== null && _super.apply(this, arguments) || this;
982
- }
983
- TimelineLaneSlicer.prototype.sliceRange = function (origRange, dateProfile, dateProfileGenerator, tDateProfile, dateEnv) {
984
- var normalRange = normalizeRange(origRange, tDateProfile, dateEnv);
985
- var segs = [];
933
+ class TimelineLaneSlicer extends common.Slicer {
934
+ sliceRange(origRange, dateProfile, dateProfileGenerator, tDateProfile, dateEnv) {
935
+ let normalRange = normalizeRange(origRange, tDateProfile, dateEnv);
936
+ let segs = [];
986
937
  // protect against when the span is entirely in an invalid date region
987
938
  if (computeDateSnapCoverage(normalRange.start, tDateProfile, dateEnv)
988
939
  < computeDateSnapCoverage(normalRange.end, tDateProfile, dateEnv)) {
989
940
  // intersect the footprint's range with the grid's range
990
- var slicedRange = common.intersectRanges(normalRange, tDateProfile.normalizedRange);
941
+ let slicedRange = common.intersectRanges(normalRange, tDateProfile.normalizedRange);
991
942
  if (slicedRange) {
992
943
  segs.push({
993
944
  start: slicedRange.start,
@@ -1000,86 +951,74 @@ var TimelineLaneSlicer = /** @class */ (function (_super) {
1000
951
  }
1001
952
  }
1002
953
  return segs;
1003
- };
1004
- return TimelineLaneSlicer;
1005
- }(common.Slicer));
954
+ }
955
+ }
1006
956
 
1007
- var DEFAULT_TIME_FORMAT = common.createFormatter({
957
+ const DEFAULT_TIME_FORMAT = common.createFormatter({
1008
958
  hour: 'numeric',
1009
959
  minute: '2-digit',
1010
960
  omitZeroMinute: true,
1011
961
  meridiem: 'narrow',
1012
962
  });
1013
- var TimelineEvent = /** @class */ (function (_super) {
1014
- tslib.__extends(TimelineEvent, _super);
1015
- function TimelineEvent() {
1016
- return _super !== null && _super.apply(this, arguments) || this;
1017
- }
1018
- TimelineEvent.prototype.render = function () {
1019
- var props = this.props;
1020
- return (common.createElement(common.StandardEvent, tslib.__assign({}, props, { extraClassNames: ['fc-timeline-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TIME_FORMAT, defaultDisplayEventTime: !props.isTimeScale })));
1021
- };
1022
- return TimelineEvent;
1023
- }(common.BaseComponent));
963
+ class TimelineEvent extends common.BaseComponent {
964
+ render() {
965
+ let { props } = this;
966
+ return (common.createElement(common.StandardEvent, Object.assign({}, props, { extraClassNames: ['fc-timeline-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TIME_FORMAT, defaultDisplayEventTime: !props.isTimeScale })));
967
+ }
968
+ }
1024
969
 
1025
- var TimelineLaneMoreLink = /** @class */ (function (_super) {
1026
- tslib.__extends(TimelineLaneMoreLink, _super);
1027
- function TimelineLaneMoreLink() {
1028
- var _this = _super !== null && _super.apply(this, arguments) || this;
1029
- _this.rootElRef = common.createRef();
1030
- return _this;
1031
- }
1032
- TimelineLaneMoreLink.prototype.render = function () {
1033
- var _this = this;
1034
- var _a = this, props = _a.props, context = _a.context;
1035
- var hiddenSegs = props.hiddenSegs, elRef = props.elRef, placement = props.placement, resourceId = props.resourceId;
1036
- var top = placement.top, hcoords = placement.hcoords;
1037
- var isVisible = hcoords && top !== null;
1038
- var hStyle = coordsToCss(hcoords, context.isRtl);
1039
- var extraDateSpan = resourceId ? { resourceId: resourceId } : {};
1040
- return (common.createElement(common.MoreLinkRoot, { allDayDate: null, moreCnt: hiddenSegs.length, allSegs: hiddenSegs, hiddenSegs: hiddenSegs, alignmentElRef: this.rootElRef, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: extraDateSpan, popoverContent: function () { return (common.createElement(common.Fragment, null, hiddenSegs.map(function (seg) {
1041
- var instanceId = seg.eventRange.instance.instanceId;
970
+ class TimelineLaneMoreLink extends common.BaseComponent {
971
+ constructor() {
972
+ super(...arguments);
973
+ this.rootElRef = common.createRef();
974
+ }
975
+ render() {
976
+ let { props, context } = this;
977
+ let { hiddenSegs, elRef, placement, resourceId } = props;
978
+ let { top, hcoords } = placement;
979
+ let isVisible = hcoords && top !== null;
980
+ let hStyle = coordsToCss(hcoords, context.isRtl);
981
+ let extraDateSpan = resourceId ? { resourceId } : {};
982
+ return (common.createElement(common.MoreLinkRoot, { allDayDate: null, moreCnt: hiddenSegs.length, allSegs: hiddenSegs, hiddenSegs: hiddenSegs, alignmentElRef: this.rootElRef, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: extraDateSpan, popoverContent: () => (common.createElement(common.Fragment, null, hiddenSegs.map((seg) => {
983
+ let instanceId = seg.eventRange.instance.instanceId;
1042
984
  return (common.createElement("div", { key: instanceId, style: { visibility: props.isForcedInvisible[instanceId] ? 'hidden' : '' } },
1043
- common.createElement(TimelineEvent, tslib.__assign({ isTimeScale: props.isTimeScale, seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection }, common.getSegMeta(seg, props.todayRange, props.nowDate)))));
1044
- }))); } }, function (rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) { return (common.createElement("a", { ref: function (el) {
985
+ common.createElement(TimelineEvent, Object.assign({ isTimeScale: props.isTimeScale, seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection }, common.getSegMeta(seg, props.todayRange, props.nowDate)))));
986
+ }))) }, (rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) => (common.createElement("a", { ref: (el) => {
1045
987
  common.setRef(rootElRef, el); // for MoreLinkRoot
1046
988
  common.setRef(elRef, el); // for props props
1047
- common.setRef(_this.rootElRef, el); // for this component
1048
- }, className: ['fc-timeline-more-link'].concat(classNames).join(' '), style: tslib.__assign({ visibility: isVisible ? '' : 'hidden', top: top || 0 }, hStyle), onClick: handleClick, title: title, "aria-expanded": isExpanded, "aria-controls": popoverId },
1049
- common.createElement("div", { ref: innerElRef, className: "fc-timeline-more-link-inner fc-sticky" }, innerContent))); }));
1050
- };
1051
- return TimelineLaneMoreLink;
1052
- }(common.BaseComponent));
989
+ common.setRef(this.rootElRef, el); // for this component
990
+ }, className: ['fc-timeline-more-link'].concat(classNames).join(' '), style: Object.assign({ visibility: isVisible ? '' : 'hidden', top: top || 0 }, hStyle), onClick: handleClick, title: title, "aria-expanded": isExpanded, "aria-controls": popoverId },
991
+ common.createElement("div", { ref: innerElRef, className: "fc-timeline-more-link-inner fc-sticky" }, innerContent)))));
992
+ }
993
+ }
1053
994
 
1054
- var TimelineLane = /** @class */ (function (_super) {
1055
- tslib.__extends(TimelineLane, _super);
1056
- function TimelineLane() {
1057
- var _this = _super !== null && _super.apply(this, arguments) || this;
1058
- _this.slicer = new TimelineLaneSlicer();
1059
- _this.sortEventSegs = common.memoize(common.sortEventSegs);
1060
- _this.harnessElRefs = new common.RefMap();
1061
- _this.moreElRefs = new common.RefMap();
1062
- _this.innerElRef = common.createRef();
995
+ class TimelineLane extends common.BaseComponent {
996
+ constructor() {
997
+ super(...arguments);
998
+ this.slicer = new TimelineLaneSlicer();
999
+ this.sortEventSegs = common.memoize(common.sortEventSegs);
1000
+ this.harnessElRefs = new common.RefMap();
1001
+ this.moreElRefs = new common.RefMap();
1002
+ this.innerElRef = common.createRef();
1063
1003
  // TODO: memoize event positioning
1064
- _this.state = {
1004
+ this.state = {
1065
1005
  eventInstanceHeights: {},
1066
1006
  moreLinkHeights: {},
1067
1007
  };
1068
- return _this;
1069
1008
  }
1070
- TimelineLane.prototype.render = function () {
1071
- var _a = this, props = _a.props, state = _a.state, context = _a.context;
1072
- var options = context.options;
1073
- var dateProfile = props.dateProfile, tDateProfile = props.tDateProfile;
1074
- var slicedProps = this.slicer.sliceProps(props, dateProfile, tDateProfile.isTimeScale ? null : props.nextDayThreshold, context, // wish we didn't have to pass in the rest of the args...
1009
+ render() {
1010
+ let { props, state, context } = this;
1011
+ let { options } = context;
1012
+ let { dateProfile, tDateProfile } = props;
1013
+ let slicedProps = this.slicer.sliceProps(props, dateProfile, tDateProfile.isTimeScale ? null : props.nextDayThreshold, context, // wish we didn't have to pass in the rest of the args...
1075
1014
  dateProfile, context.dateProfileGenerator, tDateProfile, context.dateEnv);
1076
- var mirrorSegs = (slicedProps.eventDrag ? slicedProps.eventDrag.segs : null) ||
1015
+ let mirrorSegs = (slicedProps.eventDrag ? slicedProps.eventDrag.segs : null) ||
1077
1016
  (slicedProps.eventResize ? slicedProps.eventResize.segs : null) ||
1078
1017
  [];
1079
- var fgSegs = this.sortEventSegs(slicedProps.fgEventSegs, options.eventOrder);
1080
- var fgSegHCoords = computeSegHCoords(fgSegs, options.eventMinWidth, props.timelineCoords);
1081
- var _b = computeFgSegPlacements(fgSegs, fgSegHCoords, state.eventInstanceHeights, state.moreLinkHeights, options.eventOrderStrict, options.eventMaxStack), fgPlacements = _b[0], fgHeight = _b[1];
1082
- var isForcedInvisible = // TODO: more convenient
1018
+ let fgSegs = this.sortEventSegs(slicedProps.fgEventSegs, options.eventOrder);
1019
+ let fgSegHCoords = computeSegHCoords(fgSegs, options.eventMinWidth, props.timelineCoords);
1020
+ let [fgPlacements, fgHeight] = computeFgSegPlacements(fgSegs, fgSegHCoords, state.eventInstanceHeights, state.moreLinkHeights, options.eventOrderStrict, options.eventMaxStack);
1021
+ let isForcedInvisible = // TODO: more convenient
1083
1022
  (slicedProps.eventDrag ? slicedProps.eventDrag.affectedInstances : null) ||
1084
1023
  (slicedProps.eventResize ? slicedProps.eventResize.affectedInstances : null) ||
1085
1024
  {};
@@ -1088,54 +1027,52 @@ var TimelineLane = /** @class */ (function (_super) {
1088
1027
  common.createElement("div", { className: "fc-timeline-events fc-scrollgrid-sync-inner", ref: this.innerElRef, style: { height: fgHeight } },
1089
1028
  this.renderFgSegs(fgPlacements, isForcedInvisible, false, false, false),
1090
1029
  this.renderFgSegs(buildMirrorPlacements(mirrorSegs, props.timelineCoords, fgPlacements), {}, Boolean(slicedProps.eventDrag), Boolean(slicedProps.eventResize), false))));
1091
- };
1092
- TimelineLane.prototype.componentDidMount = function () {
1030
+ }
1031
+ componentDidMount() {
1093
1032
  this.updateSize();
1094
- };
1095
- TimelineLane.prototype.componentDidUpdate = function (prevProps, prevState) {
1033
+ }
1034
+ componentDidUpdate(prevProps, prevState) {
1096
1035
  if (prevProps.eventStore !== this.props.eventStore || // external thing changed?
1097
1036
  prevProps.timelineCoords !== this.props.timelineCoords || // external thing changed?
1098
1037
  prevState.moreLinkHeights !== this.state.moreLinkHeights // HACK. see addStateEquality
1099
1038
  ) {
1100
1039
  this.updateSize();
1101
1040
  }
1102
- };
1103
- TimelineLane.prototype.updateSize = function () {
1104
- var _this = this;
1105
- var props = this.props;
1106
- var timelineCoords = props.timelineCoords;
1041
+ }
1042
+ updateSize() {
1043
+ let { props } = this;
1044
+ let { timelineCoords } = props;
1107
1045
  if (props.onHeightChange) {
1108
1046
  props.onHeightChange(this.innerElRef.current, false);
1109
1047
  }
1110
1048
  if (timelineCoords) {
1111
1049
  this.setState({
1112
- eventInstanceHeights: common.mapHash(this.harnessElRefs.currentMap, function (harnessEl) { return (Math.round(harnessEl.getBoundingClientRect().height)); }),
1113
- moreLinkHeights: common.mapHash(this.moreElRefs.currentMap, function (moreEl) { return (Math.round(moreEl.getBoundingClientRect().height)); }),
1114
- }, function () {
1050
+ eventInstanceHeights: common.mapHash(this.harnessElRefs.currentMap, (harnessEl) => (Math.round(harnessEl.getBoundingClientRect().height))),
1051
+ moreLinkHeights: common.mapHash(this.moreElRefs.currentMap, (moreEl) => (Math.round(moreEl.getBoundingClientRect().height))),
1052
+ }, () => {
1115
1053
  if (props.onHeightChange) {
1116
- props.onHeightChange(_this.innerElRef.current, true);
1054
+ props.onHeightChange(this.innerElRef.current, true);
1117
1055
  }
1118
1056
  });
1119
1057
  }
1120
- };
1121
- TimelineLane.prototype.renderFgSegs = function (segPlacements, isForcedInvisible, isDragging, isResizing, isDateSelecting) {
1122
- var _a = this, harnessElRefs = _a.harnessElRefs, moreElRefs = _a.moreElRefs, props = _a.props, context = _a.context;
1123
- var isMirror = isDragging || isResizing || isDateSelecting;
1124
- return (common.createElement(common.Fragment, null, segPlacements.map(function (segPlacement) {
1125
- var seg = segPlacement.seg, hcoords = segPlacement.hcoords, top = segPlacement.top;
1058
+ }
1059
+ renderFgSegs(segPlacements, isForcedInvisible, isDragging, isResizing, isDateSelecting) {
1060
+ let { harnessElRefs, moreElRefs, props, context } = this;
1061
+ let isMirror = isDragging || isResizing || isDateSelecting;
1062
+ return (common.createElement(common.Fragment, null, segPlacements.map((segPlacement) => {
1063
+ let { seg, hcoords, top } = segPlacement;
1126
1064
  if (Array.isArray(seg)) { // a more-link
1127
- var isoStr = common.buildIsoString(common.computeEarliestSegStart(seg));
1065
+ let isoStr = common.buildIsoString(common.computeEarliestSegStart(seg));
1128
1066
  return (common.createElement(TimelineLaneMoreLink, { key: 'm:' + isoStr /* "m" for "more" */, elRef: moreElRefs.createRef(isoStr), hiddenSegs: seg, placement: segPlacement, dateProfile: props.dateProfile, nowDate: props.nowDate, todayRange: props.todayRange, isTimeScale: props.tDateProfile.isTimeScale, eventSelection: props.eventSelection, resourceId: props.resourceId, isForcedInvisible: isForcedInvisible }));
1129
1067
  }
1130
- var instanceId = seg.eventRange.instance.instanceId;
1131
- var isVisible = isMirror || Boolean(!isForcedInvisible[instanceId] && hcoords && top !== null);
1132
- var hStyle = coordsToCss(hcoords, context.isRtl);
1133
- return (common.createElement("div", { key: 'e:' + instanceId /* "e" for "event" */, ref: isMirror ? null : harnessElRefs.createRef(instanceId), className: "fc-timeline-event-harness", style: tslib.__assign({ visibility: isVisible ? '' : 'hidden', top: top || 0 }, hStyle) },
1134
- common.createElement(TimelineEvent, tslib.__assign({ isTimeScale: props.tDateProfile.isTimeScale, seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === props.eventSelection /* TODO: bad for mirror? */ }, common.getSegMeta(seg, props.todayRange, props.nowDate)))));
1068
+ let instanceId = seg.eventRange.instance.instanceId;
1069
+ let isVisible = isMirror || Boolean(!isForcedInvisible[instanceId] && hcoords && top !== null);
1070
+ let hStyle = coordsToCss(hcoords, context.isRtl);
1071
+ return (common.createElement("div", { key: 'e:' + instanceId /* "e" for "event" */, ref: isMirror ? null : harnessElRefs.createRef(instanceId), className: "fc-timeline-event-harness", style: Object.assign({ visibility: isVisible ? '' : 'hidden', top: top || 0 }, hStyle) },
1072
+ common.createElement(TimelineEvent, Object.assign({ isTimeScale: props.tDateProfile.isTimeScale, seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === props.eventSelection /* TODO: bad for mirror? */ }, common.getSegMeta(seg, props.todayRange, props.nowDate)))));
1135
1073
  })));
1136
- };
1137
- return TimelineLane;
1138
- }(common.BaseComponent));
1074
+ }
1075
+ }
1139
1076
  TimelineLane.addStateEquality({
1140
1077
  eventInstanceHeights: common.isPropsEqual,
1141
1078
  moreLinkHeights: common.isPropsEqual,
@@ -1144,18 +1081,17 @@ function buildMirrorPlacements(mirrorSegs, timelineCoords, fgPlacements) {
1144
1081
  if (!mirrorSegs.length || !timelineCoords) {
1145
1082
  return [];
1146
1083
  }
1147
- var topsByInstanceId = buildAbsoluteTopHash(fgPlacements); // TODO: cache this at first render?
1148
- return mirrorSegs.map(function (seg) { return ({
1149
- seg: seg,
1084
+ let topsByInstanceId = buildAbsoluteTopHash(fgPlacements); // TODO: cache this at first render?
1085
+ return mirrorSegs.map((seg) => ({
1086
+ seg,
1150
1087
  hcoords: timelineCoords.rangeToCoords(seg),
1151
1088
  top: topsByInstanceId[seg.eventRange.instance.instanceId],
1152
- }); });
1089
+ }));
1153
1090
  }
1154
1091
  function buildAbsoluteTopHash(placements) {
1155
- var topsByInstanceId = {};
1156
- for (var _i = 0, placements_1 = placements; _i < placements_1.length; _i++) {
1157
- var placement = placements_1[_i];
1158
- var seg = placement.seg;
1092
+ let topsByInstanceId = {};
1093
+ for (let placement of placements) {
1094
+ let { seg } = placement;
1159
1095
  if (!Array.isArray(seg)) { // doesn't represent a more-link
1160
1096
  topsByInstanceId[seg.eventRange.instance.instanceId] = placement.top;
1161
1097
  }
@@ -1163,52 +1099,49 @@ function buildAbsoluteTopHash(placements) {
1163
1099
  return topsByInstanceId;
1164
1100
  }
1165
1101
 
1166
- var TimelineGrid = /** @class */ (function (_super) {
1167
- tslib.__extends(TimelineGrid, _super);
1168
- function TimelineGrid() {
1169
- var _this = _super !== null && _super.apply(this, arguments) || this;
1170
- _this.slatsRef = common.createRef();
1171
- _this.state = {
1102
+ class TimelineGrid extends common.DateComponent {
1103
+ constructor() {
1104
+ super(...arguments);
1105
+ this.slatsRef = common.createRef();
1106
+ this.state = {
1172
1107
  coords: null,
1173
1108
  };
1174
- _this.handeEl = function (el) {
1109
+ this.handeEl = (el) => {
1175
1110
  if (el) {
1176
- _this.context.registerInteractiveComponent(_this, { el: el });
1111
+ this.context.registerInteractiveComponent(this, { el });
1177
1112
  }
1178
1113
  else {
1179
- _this.context.unregisterInteractiveComponent(_this);
1114
+ this.context.unregisterInteractiveComponent(this);
1180
1115
  }
1181
1116
  };
1182
- _this.handleCoords = function (coords) {
1183
- _this.setState({ coords: coords });
1184
- if (_this.props.onSlatCoords) {
1185
- _this.props.onSlatCoords(coords);
1117
+ this.handleCoords = (coords) => {
1118
+ this.setState({ coords });
1119
+ if (this.props.onSlatCoords) {
1120
+ this.props.onSlatCoords(coords);
1186
1121
  }
1187
1122
  };
1188
- return _this;
1189
- }
1190
- TimelineGrid.prototype.render = function () {
1191
- var _this = this;
1192
- var _a = this, props = _a.props, state = _a.state, context = _a.context;
1193
- var options = context.options;
1194
- var dateProfile = props.dateProfile, tDateProfile = props.tDateProfile;
1195
- var timerUnit = common.greatestDurationDenominator(tDateProfile.slotDuration).unit;
1123
+ }
1124
+ render() {
1125
+ let { props, state, context } = this;
1126
+ let { options } = context;
1127
+ let { dateProfile, tDateProfile } = props;
1128
+ let timerUnit = common.greatestDurationDenominator(tDateProfile.slotDuration).unit;
1196
1129
  return (common.createElement("div", { className: "fc-timeline-body", ref: this.handeEl, style: {
1197
1130
  minWidth: props.tableMinWidth,
1198
1131
  height: props.clientHeight,
1199
1132
  width: props.clientWidth,
1200
1133
  } },
1201
- common.createElement(common.NowTimer, { unit: timerUnit }, function (nowDate, todayRange) { return (common.createElement(common.Fragment, null,
1202
- common.createElement(TimelineSlats, { ref: _this.slatsRef, dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, todayRange: todayRange, clientWidth: props.clientWidth, tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, onCoords: _this.handleCoords, onScrollLeftRequest: props.onScrollLeftRequest }),
1134
+ common.createElement(common.NowTimer, { unit: timerUnit }, (nowDate, todayRange) => (common.createElement(common.Fragment, null,
1135
+ common.createElement(TimelineSlats, { ref: this.slatsRef, dateProfile: dateProfile, tDateProfile: tDateProfile, nowDate: nowDate, todayRange: todayRange, clientWidth: props.clientWidth, tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, onCoords: this.handleCoords, onScrollLeftRequest: props.onScrollLeftRequest }),
1203
1136
  common.createElement(TimelineLane, { dateProfile: dateProfile, tDateProfile: props.tDateProfile, nowDate: nowDate, todayRange: todayRange, nextDayThreshold: options.nextDayThreshold, businessHours: props.businessHours, eventStore: props.eventStore, eventUiBases: props.eventUiBases, dateSelection: props.dateSelection, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, timelineCoords: state.coords }),
1204
1137
  (options.nowIndicator && state.coords && state.coords.isDateInRange(nowDate)) && (common.createElement("div", { className: "fc-timeline-now-indicator-container" },
1205
- common.createElement(common.NowIndicatorRoot, { isAxis: false, date: nowDate }, function (rootElRef, classNames, innerElRef, innerContent) { return (common.createElement("div", { ref: rootElRef, className: ['fc-timeline-now-indicator-line'].concat(classNames).join(' '), style: coordToCss(state.coords.dateToCoord(nowDate), context.isRtl) }, innerContent)); }))))); })));
1206
- };
1138
+ common.createElement(common.NowIndicatorRoot, { isAxis: false, date: nowDate }, (rootElRef, classNames, innerElRef, innerContent) => (common.createElement("div", { ref: rootElRef, className: ['fc-timeline-now-indicator-line'].concat(classNames).join(' '), style: coordToCss(state.coords.dateToCoord(nowDate), context.isRtl) }, innerContent))))))))));
1139
+ }
1207
1140
  // Hit System
1208
1141
  // ------------------------------------------------------------------------------------------
1209
- TimelineGrid.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {
1210
- var slats = this.slatsRef.current;
1211
- var slatHit = slats.positionToHit(positionLeft);
1142
+ queryHit(positionLeft, positionTop, elWidth, elHeight) {
1143
+ let slats = this.slatsRef.current;
1144
+ let slatHit = slats.positionToHit(positionLeft);
1212
1145
  if (slatHit) {
1213
1146
  return {
1214
1147
  dateProfile: this.props.dateProfile,
@@ -1224,55 +1157,51 @@ var TimelineGrid = /** @class */ (function (_super) {
1224
1157
  };
1225
1158
  }
1226
1159
  return null;
1227
- };
1228
- return TimelineGrid;
1229
- }(common.DateComponent));
1160
+ }
1161
+ }
1230
1162
 
1231
- var TimelineView = /** @class */ (function (_super) {
1232
- tslib.__extends(TimelineView, _super);
1233
- function TimelineView() {
1234
- var _this = _super !== null && _super.apply(this, arguments) || this;
1235
- _this.buildTimelineDateProfile = common.memoize(buildTimelineDateProfile);
1236
- _this.scrollGridRef = common.createRef();
1237
- _this.state = {
1163
+ class TimelineView extends common.DateComponent {
1164
+ constructor() {
1165
+ super(...arguments);
1166
+ this.buildTimelineDateProfile = common.memoize(buildTimelineDateProfile);
1167
+ this.scrollGridRef = common.createRef();
1168
+ this.state = {
1238
1169
  slatCoords: null,
1239
1170
  slotCushionMaxWidth: null,
1240
1171
  };
1241
- _this.handleSlatCoords = function (slatCoords) {
1242
- _this.setState({ slatCoords: slatCoords });
1172
+ this.handleSlatCoords = (slatCoords) => {
1173
+ this.setState({ slatCoords });
1243
1174
  };
1244
- _this.handleScrollLeftRequest = function (scrollLeft) {
1245
- var scrollGrid = _this.scrollGridRef.current;
1175
+ this.handleScrollLeftRequest = (scrollLeft) => {
1176
+ let scrollGrid = this.scrollGridRef.current;
1246
1177
  scrollGrid.forceScrollLeft(0, scrollLeft);
1247
1178
  };
1248
- _this.handleMaxCushionWidth = function (slotCushionMaxWidth) {
1249
- _this.setState({
1179
+ this.handleMaxCushionWidth = (slotCushionMaxWidth) => {
1180
+ this.setState({
1250
1181
  slotCushionMaxWidth: Math.ceil(slotCushionMaxWidth), // for less rerendering TODO: DRY
1251
1182
  });
1252
1183
  };
1253
- return _this;
1254
- }
1255
- TimelineView.prototype.render = function () {
1256
- var _this = this;
1257
- var _a = this, props = _a.props, state = _a.state, context = _a.context;
1258
- var options = context.options;
1259
- var stickyHeaderDates = !props.forPrint && common.getStickyHeaderDates(options);
1260
- var stickyFooterScrollbar = !props.forPrint && common.getStickyFooterScrollbar(options);
1261
- var tDateProfile = this.buildTimelineDateProfile(props.dateProfile, context.dateEnv, options, context.dateProfileGenerator);
1262
- var extraClassNames = [
1184
+ }
1185
+ render() {
1186
+ let { props, state, context } = this;
1187
+ let { options } = context;
1188
+ let stickyHeaderDates = !props.forPrint && common.getStickyHeaderDates(options);
1189
+ let stickyFooterScrollbar = !props.forPrint && common.getStickyFooterScrollbar(options);
1190
+ let tDateProfile = this.buildTimelineDateProfile(props.dateProfile, context.dateEnv, options, context.dateProfileGenerator);
1191
+ let extraClassNames = [
1263
1192
  'fc-timeline',
1264
1193
  options.eventOverlap === false ? 'fc-timeline-overlap-disabled' : '',
1265
1194
  ];
1266
- var slotMinWidth = options.slotMinWidth;
1267
- var slatCols = buildSlatCols(tDateProfile, slotMinWidth || this.computeFallbackSlotMinWidth(tDateProfile));
1268
- var sections = [
1195
+ let { slotMinWidth } = options;
1196
+ let slatCols = buildSlatCols(tDateProfile, slotMinWidth || this.computeFallbackSlotMinWidth(tDateProfile));
1197
+ let sections = [
1269
1198
  {
1270
1199
  type: 'header',
1271
1200
  key: 'header',
1272
1201
  isSticky: stickyHeaderDates,
1273
1202
  chunks: [{
1274
1203
  key: 'timeline',
1275
- content: function (contentArg) { return (common.createElement(TimelineHeader, { dateProfile: props.dateProfile, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, tDateProfile: tDateProfile, slatCoords: state.slatCoords, onMaxCushionWidth: slotMinWidth ? null : _this.handleMaxCushionWidth })); },
1204
+ content: (contentArg) => (common.createElement(TimelineHeader, { dateProfile: props.dateProfile, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, tDateProfile: tDateProfile, slatCoords: state.slatCoords, onMaxCushionWidth: slotMinWidth ? null : this.handleMaxCushionWidth })),
1276
1205
  }],
1277
1206
  },
1278
1207
  {
@@ -1281,7 +1210,7 @@ var TimelineView = /** @class */ (function (_super) {
1281
1210
  liquid: true,
1282
1211
  chunks: [{
1283
1212
  key: 'timeline',
1284
- content: function (contentArg) { return (common.createElement(TimelineGrid, tslib.__assign({}, props, { clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, tDateProfile: tDateProfile, onSlatCoords: _this.handleSlatCoords, onScrollLeftRequest: _this.handleScrollLeftRequest }))); },
1213
+ content: (contentArg) => (common.createElement(TimelineGrid, Object.assign({}, props, { clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, tableMinWidth: contentArg.tableMinWidth, tableColGroupNode: contentArg.tableColGroupNode, tDateProfile: tDateProfile, onSlatCoords: this.handleSlatCoords, onScrollLeftRequest: this.handleScrollLeftRequest }))),
1285
1214
  }],
1286
1215
  },
1287
1216
  ];
@@ -1296,16 +1225,15 @@ var TimelineView = /** @class */ (function (_super) {
1296
1225
  }],
1297
1226
  });
1298
1227
  }
1299
- return (common.createElement(common.ViewRoot, { viewSpec: context.viewSpec }, function (rootElRef, classNames) { return (common.createElement("div", { ref: rootElRef, className: extraClassNames.concat(classNames).join(' ') },
1300
- common.createElement(scrollgrid.ScrollGrid, { ref: _this.scrollGridRef, liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: false, colGroups: [
1228
+ return (common.createElement(common.ViewRoot, { viewSpec: context.viewSpec }, (rootElRef, classNames) => (common.createElement("div", { ref: rootElRef, className: extraClassNames.concat(classNames).join(' ') },
1229
+ common.createElement(scrollgrid.ScrollGrid, { ref: this.scrollGridRef, liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: false, colGroups: [
1301
1230
  { cols: slatCols },
1302
- ], sections: sections }))); }));
1303
- };
1304
- TimelineView.prototype.computeFallbackSlotMinWidth = function (tDateProfile) {
1231
+ ], sections: sections })))));
1232
+ }
1233
+ computeFallbackSlotMinWidth(tDateProfile) {
1305
1234
  return Math.max(30, ((this.state.slotCushionMaxWidth || 0) / tDateProfile.slotsPerLabel));
1306
- };
1307
- return TimelineView;
1308
- }(common.DateComponent));
1235
+ }
1236
+ }
1309
1237
  function buildSlatCols(tDateProfile, slotMinWidth) {
1310
1238
  return [{
1311
1239
  span: tDateProfile.slotCnt,
@@ -1313,6 +1241,36 @@ function buildSlatCols(tDateProfile, slotMinWidth) {
1313
1241
  }];
1314
1242
  }
1315
1243
 
1244
+ function styleInject(css, ref) {
1245
+ if ( ref === void 0 ) ref = {};
1246
+ var insertAt = ref.insertAt;
1247
+
1248
+ if (!css || typeof document === 'undefined') { return; }
1249
+
1250
+ var head = document.head || document.getElementsByTagName('head')[0];
1251
+ var style = document.createElement('style');
1252
+ style.type = 'text/css';
1253
+
1254
+ if (insertAt === 'top') {
1255
+ if (head.firstChild) {
1256
+ head.insertBefore(style, head.firstChild);
1257
+ } else {
1258
+ head.appendChild(style);
1259
+ }
1260
+ } else {
1261
+ head.appendChild(style);
1262
+ }
1263
+
1264
+ if (style.styleSheet) {
1265
+ style.styleSheet.cssText = css;
1266
+ } else {
1267
+ style.appendChild(document.createTextNode(css));
1268
+ }
1269
+ }
1270
+
1271
+ var css_248z = "\n\n .fc .fc-timeline-body {\n min-height: 100%;\n position: relative;\n z-index: 1; /* scope slots, bg, etc */\n }\n/*\nvertical slots in both the header AND the body\n*/\n.fc .fc-timeline-slots {\n position: absolute;\n z-index: 1;\n top: 0;\n bottom: 0\n }\n.fc .fc-timeline-slots > table {\n height: 100%;\n }\n.fc {\n\n /* border for both header AND body cells */\n\n}\n.fc .fc-timeline-slot-minor {\n border-style: dotted;\n }\n.fc {\n\n /* header cells (aka \"label\") */\n\n}\n.fc .fc-timeline-slot-frame {\n display: flex;\n align-items: center; /* vertical align */\n justify-content: center; /* horizontal align */\n }\n.fc .fc-timeline-header-row-chrono { /* a row of times */\n }\n.fc .fc-timeline-header-row-chrono .fc-timeline-slot-frame {\n justify-content: flex-start; /* horizontal align left or right */\n }\n.fc .fc-timeline-header-row:last-child { /* guaranteed NOT to have sticky elements */\n }\n.fc .fc-timeline-header-row:last-child .fc-timeline-slot-frame {\n /* so text doesn't bleed out and cause extra scroll */\n /* (won't work with sticky elements) */\n overflow: hidden;\n }\n.fc .fc-timeline-slot-cushion {\n padding: 4px 5px; /* TODO: unify with fc-col-header? */\n white-space: nowrap;\n }\n.fc {\n\n /* NOTE: how does the top row of cells get horizontally centered? */\n /* for the non-chrono-row, the fc-sticky system looks for text-align center, */\n /* and it's a fluke that the default browser stylesheet already does this for <th> */\n /* TODO: have StickyScrolling look at natural left coord to detect centeredness. */\n\n}\n/* only owns one side, so can do dotted */\n.fc-direction-ltr .fc-timeline-slot { border-right: 0 !important }\n.fc-direction-rtl .fc-timeline-slot { border-left: 0 !important }\n.fc .fc-timeline-now-indicator-container {\n position: absolute;\n z-index: 4;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 0;\n }\n.fc .fc-timeline-now-indicator-arrow,\n .fc .fc-timeline-now-indicator-line {\n position: absolute;\n top: 0;\n border-style: solid;\n border-color: red;\n border-color: var(--fc-now-indicator-color, red);\n }\n.fc .fc-timeline-now-indicator-arrow {\n margin: 0 -6px; /* 5, then one more to counteract scroller's negative margins */\n\n /* triangle pointing down. TODO: mixin */\n border-width: 6px 5px 0 5px;\n border-left-color: transparent;\n border-right-color: transparent;\n }\n.fc .fc-timeline-now-indicator-line {\n margin: 0 -1px; /* counteract scroller's negative margins */\n bottom: 0;\n border-width: 0 0 0 1px;\n }\n.fc {\n\n /* container */\n\n}\n.fc .fc-timeline-events {\n position: relative;\n z-index: 3;\n width: 0; /* for event positioning. will end up on correct side based on dir */\n }\n.fc {\n\n /* harness */\n\n}\n.fc .fc-timeline-event-harness,\n .fc .fc-timeline-more-link {\n position: absolute;\n top: 0; /* for when when top can't be computed yet */\n /* JS will set tht left/right */\n }\n/* z-index, scoped within fc-timeline-events */\n.fc-timeline-event { z-index: 1 }\n.fc-timeline-event.fc-event-mirror { z-index: 2 }\n.fc-timeline-event {\n position: relative; /* contains things. TODO: make part of fc-h-event and fc-v-event */\n display: flex; /* for v-aligning start/end arrows and making fc-event-main stretch all the way */\n align-items: center;\n border-radius: 0;\n padding: 2px 1px;\n margin-bottom: 1px;\n font-size: .85em;\n font-size: var(--fc-small-font-size, .85em)\n\n /* time and title spacing */\n /* ---------------------------------------------------------------------------------------------------- */\n}\n.fc-timeline-event .fc-event-main {\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 0; /* important for allowing to shrink all the way */\n }\n.fc-timeline-event .fc-event-time {\n font-weight: bold;\n }\n.fc-timeline-event .fc-event-time,\n .fc-timeline-event .fc-event-title {\n white-space: nowrap;\n padding: 0 2px;\n }\n/* move 1px away from slot line */\n.fc-direction-ltr .fc-timeline-event.fc-event-end,\n .fc-direction-ltr .fc-timeline-more-link {\n margin-right: 1px;\n }\n.fc-direction-rtl .fc-timeline-event.fc-event-end,\n .fc-direction-rtl .fc-timeline-more-link {\n margin-left: 1px;\n }\n/* make event beefier when overlap not allowed */\n.fc-timeline-overlap-disabled .fc-timeline-event {\n padding-top: 5px;\n padding-bottom: 5px;\n margin-bottom: 0;\n}\n/* arrows indicating the event continues into past/future */\n/* ---------------------------------------------------------------------------------------------------- */\n/* part of the flexbox flow */\n.fc-timeline-event:not(.fc-event-start):before,\n.fc-timeline-event:not(.fc-event-end):after {\n content: \"\";\n flex-grow: 0;\n flex-shrink: 0;\n opacity: .5;\n\n /* triangle. TODO: mixin */\n width: 0;\n height: 0;\n margin: 0 1px;\n border: 5px solid #000; /* TODO: var */\n border-top-color: transparent;\n border-bottom-color: transparent;\n}\n/* pointing left */\n.fc-direction-ltr .fc-timeline-event:not(.fc-event-start):before,\n.fc-direction-rtl .fc-timeline-event:not(.fc-event-end):after {\n border-left: 0;\n}\n/* pointing right */\n.fc-direction-ltr .fc-timeline-event:not(.fc-event-end):after,\n.fc-direction-rtl .fc-timeline-event:not(.fc-event-start):before {\n border-right: 0;\n}\n/* +more events indicator */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-timeline-more-link {\n font-size: .85em;\n font-size: var(--fc-small-font-size, .85em);\n color: inherit;\n color: var(--fc-more-link-text-color, inherit);\n background: #d0d0d0;\n background: var(--fc-more-link-bg-color, #d0d0d0);\n padding: 1px;\n cursor: pointer;\n}\n.fc-timeline-more-link-inner { /* has fc-sticky */\n display: inline-block;\n left: 0;\n right: 0;\n padding: 2px;\n}\n.fc .fc-timeline-bg { /* a container for bg content */\n position: absolute;\n z-index: 2;\n top: 0;\n bottom: 0;\n width: 0;\n left: 0; /* will take precedence when LTR */\n right: 0; /* will take precedence when RTL */ /* TODO: kill */\n }\n.fc .fc-timeline-bg .fc-non-business { z-index: 1 }\n.fc .fc-timeline-bg .fc-bg-event { z-index: 2 }\n.fc .fc-timeline-bg .fc-highlight { z-index: 3 }\n.fc .fc-timeline-bg-harness {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n";
1272
+ styleInject(css_248z);
1273
+
1316
1274
  var main = common.createPlugin({
1317
1275
  deps: [
1318
1276
  premiumCommonPlugin__default['default'],