@fullcalendar/core 6.1.0 → 6.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{index.esm.js → index.cjs} +159 -147
- package/index.global.js +22 -18
- package/index.global.min.js +3 -3
- package/index.js +148 -158
- package/{internal-common.esm.js → internal-common.cjs} +5095 -4855
- package/internal-common.d.ts +6 -6
- package/internal-common.js +4610 -4844
- package/internal.cjs +196 -0
- package/internal.js +3 -196
- package/locales/{af.esm.js → af.cjs} +5 -1
- package/locales/af.global.js +2 -2
- package/locales/af.global.min.js +2 -2
- package/locales/af.js +1 -5
- package/locales/{ar-dz.esm.js → ar-dz.cjs} +5 -1
- package/locales/ar-dz.global.js +2 -2
- package/locales/ar-dz.global.min.js +2 -2
- package/locales/ar-dz.js +1 -5
- package/locales/{ar-kw.esm.js → ar-kw.cjs} +5 -1
- package/locales/ar-kw.global.js +2 -2
- package/locales/ar-kw.global.min.js +2 -2
- package/locales/ar-kw.js +1 -5
- package/locales/{ar-ly.esm.js → ar-ly.cjs} +5 -1
- package/locales/ar-ly.global.js +2 -2
- package/locales/ar-ly.global.min.js +2 -2
- package/locales/ar-ly.js +1 -5
- package/locales/{ar-ma.esm.js → ar-ma.cjs} +5 -1
- package/locales/ar-ma.global.js +2 -2
- package/locales/ar-ma.global.min.js +2 -2
- package/locales/ar-ma.js +1 -5
- package/locales/{ar-sa.esm.js → ar-sa.cjs} +5 -1
- package/locales/ar-sa.global.js +2 -2
- package/locales/ar-sa.global.min.js +2 -2
- package/locales/ar-sa.js +1 -5
- package/locales/{ar-tn.esm.js → ar-tn.cjs} +5 -1
- package/locales/ar-tn.global.js +2 -2
- package/locales/ar-tn.global.min.js +2 -2
- package/locales/ar-tn.js +1 -5
- package/locales/{ar.esm.js → ar.cjs} +5 -1
- package/locales/ar.global.js +2 -2
- package/locales/ar.global.min.js +2 -2
- package/locales/ar.js +1 -5
- package/locales/{az.esm.js → az.cjs} +5 -1
- package/locales/az.global.js +2 -2
- package/locales/az.global.min.js +2 -2
- package/locales/az.js +1 -5
- package/locales/{bg.esm.js → bg.cjs} +5 -1
- package/locales/bg.global.js +2 -2
- package/locales/bg.global.min.js +2 -2
- package/locales/bg.js +1 -5
- package/locales/{bn.esm.js → bn.cjs} +5 -1
- package/locales/bn.global.js +2 -2
- package/locales/bn.global.min.js +2 -2
- package/locales/bn.js +1 -5
- package/locales/{bs.esm.js → bs.cjs} +5 -1
- package/locales/bs.global.js +2 -2
- package/locales/bs.global.min.js +2 -2
- package/locales/bs.js +1 -5
- package/locales/{ca.esm.js → ca.cjs} +5 -1
- package/locales/ca.global.js +2 -2
- package/locales/ca.global.min.js +2 -2
- package/locales/ca.js +1 -5
- package/locales/{cs.esm.js → cs.cjs} +5 -1
- package/locales/cs.global.js +2 -2
- package/locales/cs.global.min.js +2 -2
- package/locales/cs.js +1 -5
- package/locales/{cy.esm.js → cy.cjs} +5 -1
- package/locales/cy.global.js +2 -2
- package/locales/cy.global.min.js +2 -2
- package/locales/cy.js +1 -5
- package/locales/{da.esm.js → da.cjs} +5 -1
- package/locales/da.global.js +2 -2
- package/locales/da.global.min.js +2 -2
- package/locales/da.js +1 -5
- package/locales/{de-at.esm.js → de-at.cjs} +5 -1
- package/locales/de-at.global.js +2 -2
- package/locales/de-at.global.min.js +2 -2
- package/locales/de-at.js +1 -5
- package/locales/{de.esm.js → de.cjs} +5 -1
- package/locales/de.global.js +2 -2
- package/locales/de.global.min.js +2 -2
- package/locales/de.js +1 -5
- package/locales/{el.esm.js → el.cjs} +5 -1
- package/locales/el.global.js +2 -2
- package/locales/el.global.min.js +2 -2
- package/locales/el.js +1 -5
- package/locales/{en-au.esm.js → en-au.cjs} +5 -1
- package/locales/en-au.global.js +2 -2
- package/locales/en-au.global.min.js +2 -2
- package/locales/en-au.js +1 -5
- package/locales/{en-gb.esm.js → en-gb.cjs} +5 -1
- package/locales/en-gb.global.js +2 -2
- package/locales/en-gb.global.min.js +2 -2
- package/locales/en-gb.js +1 -5
- package/locales/{en-nz.esm.js → en-nz.cjs} +5 -1
- package/locales/en-nz.global.js +2 -2
- package/locales/en-nz.global.min.js +2 -2
- package/locales/en-nz.js +1 -5
- package/locales/{eo.esm.js → eo.cjs} +5 -1
- package/locales/eo.global.js +2 -2
- package/locales/eo.global.min.js +2 -2
- package/locales/eo.js +1 -5
- package/locales/{es-us.esm.js → es-us.cjs} +5 -1
- package/locales/es-us.global.js +2 -2
- package/locales/es-us.global.min.js +2 -2
- package/locales/es-us.js +1 -5
- package/locales/{es.esm.js → es.cjs} +5 -1
- package/locales/es.global.js +2 -2
- package/locales/es.global.min.js +2 -2
- package/locales/es.js +1 -5
- package/locales/{et.esm.js → et.cjs} +5 -1
- package/locales/et.global.js +2 -2
- package/locales/et.global.min.js +2 -2
- package/locales/et.js +1 -5
- package/locales/{eu.esm.js → eu.cjs} +5 -1
- package/locales/eu.global.js +2 -2
- package/locales/eu.global.min.js +2 -2
- package/locales/eu.js +1 -5
- package/locales/{fa.esm.js → fa.cjs} +5 -1
- package/locales/fa.global.js +2 -2
- package/locales/fa.global.min.js +2 -2
- package/locales/fa.js +1 -5
- package/locales/{fi.esm.js → fi.cjs} +5 -1
- package/locales/fi.global.js +2 -2
- package/locales/fi.global.min.js +2 -2
- package/locales/fi.js +1 -5
- package/locales/{fr-ca.esm.js → fr-ca.cjs} +5 -1
- package/locales/fr-ca.global.js +2 -2
- package/locales/fr-ca.global.min.js +2 -2
- package/locales/fr-ca.js +1 -5
- package/locales/{fr-ch.esm.js → fr-ch.cjs} +5 -1
- package/locales/fr-ch.global.js +2 -2
- package/locales/fr-ch.global.min.js +2 -2
- package/locales/fr-ch.js +1 -5
- package/locales/{fr.esm.js → fr.cjs} +5 -1
- package/locales/fr.global.js +2 -2
- package/locales/fr.global.min.js +2 -2
- package/locales/fr.js +1 -5
- package/locales/{gl.esm.js → gl.cjs} +5 -1
- package/locales/gl.global.js +2 -2
- package/locales/gl.global.min.js +2 -2
- package/locales/gl.js +1 -5
- package/locales/{he.esm.js → he.cjs} +5 -1
- package/locales/he.global.js +2 -2
- package/locales/he.global.min.js +2 -2
- package/locales/he.js +1 -5
- package/locales/{hi.esm.js → hi.cjs} +5 -1
- package/locales/hi.global.js +2 -2
- package/locales/hi.global.min.js +2 -2
- package/locales/hi.js +1 -5
- package/locales/{hr.esm.js → hr.cjs} +5 -1
- package/locales/hr.global.js +2 -2
- package/locales/hr.global.min.js +2 -2
- package/locales/hr.js +1 -5
- package/locales/{hu.esm.js → hu.cjs} +5 -1
- package/locales/hu.global.js +2 -2
- package/locales/hu.global.min.js +2 -2
- package/locales/hu.js +1 -5
- package/locales/{hy-am.esm.js → hy-am.cjs} +5 -1
- package/locales/hy-am.global.js +2 -2
- package/locales/hy-am.global.min.js +2 -2
- package/locales/hy-am.js +1 -5
- package/locales/{id.esm.js → id.cjs} +5 -1
- package/locales/id.global.js +2 -2
- package/locales/id.global.min.js +2 -2
- package/locales/id.js +1 -5
- package/locales/{is.esm.js → is.cjs} +5 -1
- package/locales/is.global.js +2 -2
- package/locales/is.global.min.js +2 -2
- package/locales/is.js +1 -5
- package/locales/{it.esm.js → it.cjs} +5 -1
- package/locales/it.global.js +2 -2
- package/locales/it.global.min.js +2 -2
- package/locales/it.js +1 -5
- package/locales/{ja.esm.js → ja.cjs} +5 -1
- package/locales/ja.global.js +2 -2
- package/locales/ja.global.min.js +2 -2
- package/locales/ja.js +1 -5
- package/locales/{ka.esm.js → ka.cjs} +5 -1
- package/locales/ka.global.js +2 -2
- package/locales/ka.global.min.js +2 -2
- package/locales/ka.js +1 -5
- package/locales/{kk.esm.js → kk.cjs} +5 -1
- package/locales/kk.global.js +2 -2
- package/locales/kk.global.min.js +2 -2
- package/locales/kk.js +1 -5
- package/locales/{km.esm.js → km.cjs} +5 -1
- package/locales/km.global.js +2 -2
- package/locales/km.global.min.js +2 -2
- package/locales/km.js +1 -5
- package/locales/{ko.esm.js → ko.cjs} +5 -1
- package/locales/ko.global.js +2 -2
- package/locales/ko.global.min.js +2 -2
- package/locales/ko.js +1 -5
- package/locales/{ku.esm.js → ku.cjs} +5 -1
- package/locales/ku.global.js +2 -2
- package/locales/ku.global.min.js +2 -2
- package/locales/ku.js +1 -5
- package/locales/{lb.esm.js → lb.cjs} +5 -1
- package/locales/lb.global.js +2 -2
- package/locales/lb.global.min.js +2 -2
- package/locales/lb.js +1 -5
- package/locales/{lt.esm.js → lt.cjs} +5 -1
- package/locales/lt.global.js +2 -2
- package/locales/lt.global.min.js +2 -2
- package/locales/lt.js +1 -5
- package/locales/{lv.esm.js → lv.cjs} +5 -1
- package/locales/lv.global.js +2 -2
- package/locales/lv.global.min.js +2 -2
- package/locales/lv.js +1 -5
- package/locales/{mk.esm.js → mk.cjs} +5 -1
- package/locales/mk.global.js +2 -2
- package/locales/mk.global.min.js +2 -2
- package/locales/mk.js +1 -5
- package/locales/{ms.esm.js → ms.cjs} +5 -1
- package/locales/ms.global.js +2 -2
- package/locales/ms.global.min.js +2 -2
- package/locales/ms.js +1 -5
- package/locales/{nb.esm.js → nb.cjs} +5 -1
- package/locales/nb.global.js +2 -2
- package/locales/nb.global.min.js +2 -2
- package/locales/nb.js +1 -5
- package/locales/{ne.esm.js → ne.cjs} +5 -1
- package/locales/ne.global.js +2 -2
- package/locales/ne.global.min.js +2 -2
- package/locales/ne.js +1 -5
- package/locales/{nl.esm.js → nl.cjs} +5 -1
- package/locales/nl.global.js +2 -2
- package/locales/nl.global.min.js +2 -2
- package/locales/nl.js +1 -5
- package/locales/{nn.esm.js → nn.cjs} +5 -1
- package/locales/nn.global.js +2 -2
- package/locales/nn.global.min.js +2 -2
- package/locales/nn.js +1 -5
- package/locales/{pl.esm.js → pl.cjs} +5 -1
- package/locales/pl.global.js +2 -2
- package/locales/pl.global.min.js +2 -2
- package/locales/pl.js +1 -5
- package/locales/{pt-br.esm.js → pt-br.cjs} +5 -1
- package/locales/pt-br.global.js +2 -2
- package/locales/pt-br.global.min.js +2 -2
- package/locales/pt-br.js +1 -5
- package/locales/{pt.esm.js → pt.cjs} +5 -1
- package/locales/pt.global.js +2 -2
- package/locales/pt.global.min.js +2 -2
- package/locales/pt.js +1 -5
- package/locales/{ro.esm.js → ro.cjs} +5 -1
- package/locales/ro.global.js +2 -2
- package/locales/ro.global.min.js +2 -2
- package/locales/ro.js +1 -5
- package/locales/{ru.esm.js → ru.cjs} +5 -1
- package/locales/ru.global.js +2 -2
- package/locales/ru.global.min.js +2 -2
- package/locales/ru.js +1 -5
- package/locales/{si-lk.esm.js → si-lk.cjs} +5 -1
- package/locales/si-lk.global.js +2 -2
- package/locales/si-lk.global.min.js +2 -2
- package/locales/si-lk.js +1 -5
- package/locales/{sk.esm.js → sk.cjs} +5 -1
- package/locales/sk.global.js +2 -2
- package/locales/sk.global.min.js +2 -2
- package/locales/sk.js +1 -5
- package/locales/{sl.esm.js → sl.cjs} +5 -1
- package/locales/sl.global.js +2 -2
- package/locales/sl.global.min.js +2 -2
- package/locales/sl.js +1 -5
- package/locales/{sm.esm.js → sm.cjs} +5 -1
- package/locales/sm.global.js +2 -2
- package/locales/sm.global.min.js +2 -2
- package/locales/sm.js +1 -5
- package/locales/{sq.esm.js → sq.cjs} +5 -1
- package/locales/sq.global.js +2 -2
- package/locales/sq.global.min.js +2 -2
- package/locales/sq.js +1 -5
- package/locales/{sr-cyrl.esm.js → sr-cyrl.cjs} +5 -1
- package/locales/sr-cyrl.global.js +2 -2
- package/locales/sr-cyrl.global.min.js +2 -2
- package/locales/sr-cyrl.js +1 -5
- package/locales/{sr.esm.js → sr.cjs} +5 -1
- package/locales/sr.global.js +2 -2
- package/locales/sr.global.min.js +2 -2
- package/locales/sr.js +1 -5
- package/locales/{sv.esm.js → sv.cjs} +5 -1
- package/locales/sv.global.js +2 -2
- package/locales/sv.global.min.js +2 -2
- package/locales/sv.js +1 -5
- package/locales/{ta-in.esm.js → ta-in.cjs} +5 -1
- package/locales/ta-in.global.js +2 -2
- package/locales/ta-in.global.min.js +2 -2
- package/locales/ta-in.js +1 -5
- package/locales/{th.esm.js → th.cjs} +5 -1
- package/locales/th.global.js +2 -2
- package/locales/th.global.min.js +2 -2
- package/locales/th.js +1 -5
- package/locales/{tr.esm.js → tr.cjs} +5 -1
- package/locales/tr.global.js +2 -2
- package/locales/tr.global.min.js +2 -2
- package/locales/tr.js +1 -5
- package/locales/{ug.esm.js → ug.cjs} +5 -1
- package/locales/ug.global.js +2 -2
- package/locales/ug.global.min.js +2 -2
- package/locales/ug.js +1 -5
- package/locales/{uk.esm.js → uk.cjs} +5 -1
- package/locales/uk.global.js +2 -2
- package/locales/uk.global.min.js +2 -2
- package/locales/uk.js +1 -5
- package/locales/{uz-cy.esm.js → uz-cy.cjs} +5 -1
- package/locales/uz-cy.global.js +2 -2
- package/locales/uz-cy.global.min.js +2 -2
- package/locales/uz-cy.js +1 -5
- package/locales/{uz.esm.js → uz.cjs} +5 -1
- package/locales/uz.global.js +2 -2
- package/locales/uz.global.min.js +2 -2
- package/locales/uz.js +1 -5
- package/locales/{vi.esm.js → vi.cjs} +5 -1
- package/locales/vi.global.js +2 -2
- package/locales/vi.global.min.js +2 -2
- package/locales/vi.js +1 -5
- package/locales/{zh-cn.esm.js → zh-cn.cjs} +5 -1
- package/locales/zh-cn.global.js +2 -2
- package/locales/zh-cn.global.min.js +2 -2
- package/locales/zh-cn.js +1 -5
- package/locales/{zh-tw.esm.js → zh-tw.cjs} +5 -1
- package/locales/zh-tw.global.js +2 -2
- package/locales/zh-tw.global.min.js +2 -2
- package/locales/zh-tw.js +1 -5
- package/locales-all.cjs +89 -0
- package/locales-all.global.js +2 -2
- package/locales-all.global.min.js +2 -2
- package/locales-all.js +81 -85
- package/package.json +19 -14
- package/preact.cjs +22 -0
- package/preact.js +3 -22
- package/internal.esm.js +0 -3
- package/locales-all.esm.js +0 -85
- package/preact.esm.js +0 -3
package/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var internalCommon = require('./internal-common.js');
|
|
6
|
-
var preact = require('preact');
|
|
7
|
-
require('preact/compat');
|
|
1
|
+
import { i as injectStyles, m as mergeProps, g as guid, a as isArraysEqual, T as Theme, b as mapHash, V as ViewContextType, C as ContentContainer, c as buildViewClassNames, d as greatestDurationDenominator, e as createDuration, B as BASE_OPTION_DEFAULTS, f as arrayToHash, h as filterHash, j as buildEventSourceRefiners, p as parseEventSource, k as formatWithOrdinals, u as unpromisify, l as buildRangeApiWithTimeZone, n as identity, r as requestJson, s as subtractDurations, o as intersectRanges, q as startOfDay, t as addDays, v as hashValuesToArray, w as buildEventApis, D as DelayedRunner, x as createFormatter, y as diffWholeDays, z as memoize, A as memoizeObjArg, E as isPropsEqual, F as Emitter, G as getInitialDate, H as rangeContainsMarker, I as createEmptyEventStore, J as reduceCurrentDate, K as reduceEventStore, L as rezoneEventStoreDates, M as mergeRawOptions, N as BASE_OPTION_REFINERS, O as CALENDAR_LISTENER_REFINERS, P as CALENDAR_OPTION_REFINERS, Q as COMPLEX_OPTION_COMPARATORS, R as VIEW_OPTION_REFINERS, S as DateEnv, U as DateProfileGenerator, W as createEventUi, X as parseBusinessHours, Y as BaseComponent, Z as setRef, _ as Interaction, $ as getElSeg, a0 as elementClosest, a1 as EventImpl, a2 as listenBySelector, a3 as listenToHoverBySelector, a4 as PureComponent, a5 as buildViewContext, a6 as getUniqueDomId, a7 as parseInteractionSettings, a8 as interactionSettingsStore, a9 as getNow, aa as CalendarImpl, ab as flushSync, ac as CalendarRoot, ad as RenderId, ae as ensureElHasStyles, af as applyStyleProp, ag as sliceEventStore } from './internal-common.js';
|
|
2
|
+
export { ah as JsonRequestError } from './internal-common.js';
|
|
3
|
+
import { createElement, createRef, Fragment, render } from 'preact';
|
|
4
|
+
import 'preact/compat';
|
|
8
5
|
|
|
9
6
|
var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-unselectable{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;user-select:none}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url(\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\") format(\"truetype\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button::-moz-focus-inner{border-style:none;padding:0}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}";
|
|
10
|
-
|
|
7
|
+
injectStyles(css_248z);
|
|
11
8
|
|
|
12
9
|
const globalLocales = [];
|
|
13
10
|
|
|
@@ -91,7 +88,7 @@ function queryRawLocale(codes, available) {
|
|
|
91
88
|
return null;
|
|
92
89
|
}
|
|
93
90
|
function parseLocale(codeArg, codes, raw) {
|
|
94
|
-
let merged =
|
|
91
|
+
let merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ['buttonText']);
|
|
95
92
|
delete merged.code; // don't want this part of the options
|
|
96
93
|
let { week } = merged;
|
|
97
94
|
delete merged.week;
|
|
@@ -107,7 +104,7 @@ function parseLocale(codeArg, codes, raw) {
|
|
|
107
104
|
// TODO: easier way to add new hooks? need to update a million things
|
|
108
105
|
function createPlugin(input) {
|
|
109
106
|
return {
|
|
110
|
-
id:
|
|
107
|
+
id: guid(),
|
|
111
108
|
name: input.name,
|
|
112
109
|
premiumReleaseDate: input.premiumReleaseDate ? new Date(input.premiumReleaseDate) : undefined,
|
|
113
110
|
deps: input.deps || [],
|
|
@@ -208,7 +205,7 @@ function buildBuildPluginHooks() {
|
|
|
208
205
|
let currentGlobalDefs = [];
|
|
209
206
|
let currentHooks;
|
|
210
207
|
return (overrideDefs, globalDefs) => {
|
|
211
|
-
if (!currentHooks || !
|
|
208
|
+
if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) {
|
|
212
209
|
currentHooks = buildPluginHooks(overrideDefs, globalDefs);
|
|
213
210
|
}
|
|
214
211
|
currentOverrideDefs = overrideDefs;
|
|
@@ -263,7 +260,7 @@ function compareOptionalDates(date0, date1) {
|
|
|
263
260
|
return new Date(Math.max(date0.valueOf(), date1.valueOf()));
|
|
264
261
|
}
|
|
265
262
|
|
|
266
|
-
class StandardTheme extends
|
|
263
|
+
class StandardTheme extends Theme {
|
|
267
264
|
}
|
|
268
265
|
StandardTheme.prototype.classes = {
|
|
269
266
|
root: 'fc-theme-standard',
|
|
@@ -340,7 +337,7 @@ function buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) {
|
|
|
340
337
|
}
|
|
341
338
|
|
|
342
339
|
function parseViewConfigs(inputs) {
|
|
343
|
-
return
|
|
340
|
+
return mapHash(inputs, parseViewConfig);
|
|
344
341
|
}
|
|
345
342
|
function parseViewConfig(input) {
|
|
346
343
|
let rawOptions = typeof input === 'function' ?
|
|
@@ -358,14 +355,14 @@ function parseViewConfig(input) {
|
|
|
358
355
|
};
|
|
359
356
|
}
|
|
360
357
|
function createViewHookComponent(options) {
|
|
361
|
-
return (viewProps) => (
|
|
358
|
+
return (viewProps) => (createElement(ViewContextType.Consumer, null, (context) => (createElement(ContentContainer, { elTag: "div", elClasses: buildViewClassNames(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount }))));
|
|
362
359
|
}
|
|
363
360
|
|
|
364
361
|
function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
|
|
365
362
|
let defaultConfigs = parseViewConfigs(defaultInputs);
|
|
366
363
|
let overrideConfigs = parseViewConfigs(optionOverrides.views);
|
|
367
364
|
let viewDefs = compileViewDefs(defaultConfigs, overrideConfigs);
|
|
368
|
-
return
|
|
365
|
+
return mapHash(viewDefs, (viewDef) => buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults));
|
|
369
366
|
}
|
|
370
367
|
function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
|
|
371
368
|
let durationInput = viewDef.overrides.duration ||
|
|
@@ -379,7 +376,7 @@ function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionO
|
|
|
379
376
|
if (durationInput) {
|
|
380
377
|
duration = createDurationCached(durationInput);
|
|
381
378
|
if (duration) { // valid?
|
|
382
|
-
let denom =
|
|
379
|
+
let denom = greatestDurationDenominator(duration);
|
|
383
380
|
durationUnit = denom.unit;
|
|
384
381
|
if (denom.value === 1) {
|
|
385
382
|
singleUnit = durationUnit;
|
|
@@ -428,7 +425,7 @@ function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionO
|
|
|
428
425
|
viewDef.overrides.buttonText,
|
|
429
426
|
buttonTextDefault: queryButtonText(localeDefaults) ||
|
|
430
427
|
viewDef.defaults.buttonText ||
|
|
431
|
-
queryButtonText(
|
|
428
|
+
queryButtonText(BASE_OPTION_DEFAULTS) ||
|
|
432
429
|
viewDef.type,
|
|
433
430
|
// not DRY
|
|
434
431
|
buttonTitleOverride: queryButtonTitle(dynamicOptionOverrides) ||
|
|
@@ -436,7 +433,7 @@ function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionO
|
|
|
436
433
|
viewDef.overrides.buttonHint,
|
|
437
434
|
buttonTitleDefault: queryButtonTitle(localeDefaults) ||
|
|
438
435
|
viewDef.defaults.buttonHint ||
|
|
439
|
-
queryButtonTitle(
|
|
436
|
+
queryButtonTitle(BASE_OPTION_DEFAULTS),
|
|
440
437
|
// will eventually fall back to buttonText
|
|
441
438
|
};
|
|
442
439
|
}
|
|
@@ -446,7 +443,7 @@ function createDurationCached(durationInput) {
|
|
|
446
443
|
let json = JSON.stringify(durationInput);
|
|
447
444
|
let res = durationInputMap[json];
|
|
448
445
|
if (res === undefined) {
|
|
449
|
-
res =
|
|
446
|
+
res = createDuration(durationInput);
|
|
450
447
|
durationInputMap[json] = res;
|
|
451
448
|
}
|
|
452
449
|
return res;
|
|
@@ -513,7 +510,7 @@ function reduceEventSources(eventSources, action, dateProfile, context) {
|
|
|
513
510
|
return eventSources;
|
|
514
511
|
case 'FETCH_EVENT_SOURCES':
|
|
515
512
|
return fetchSourcesByIds(eventSources, action.sourceIds ? // why no type?
|
|
516
|
-
|
|
513
|
+
arrayToHash(action.sourceIds) :
|
|
517
514
|
excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context);
|
|
518
515
|
case 'RECEIVE_EVENTS':
|
|
519
516
|
case 'RECEIVE_EVENT_ERROR':
|
|
@@ -547,10 +544,10 @@ function addSources(eventSourceHash, sources, fetchRange, context) {
|
|
|
547
544
|
return Object.assign(Object.assign({}, eventSourceHash), hash);
|
|
548
545
|
}
|
|
549
546
|
function removeSource(eventSourceHash, sourceId) {
|
|
550
|
-
return
|
|
547
|
+
return filterHash(eventSourceHash, (eventSource) => eventSource.sourceId !== sourceId);
|
|
551
548
|
}
|
|
552
549
|
function fetchDirtySources(sourceHash, fetchRange, context) {
|
|
553
|
-
return fetchSourcesByIds(sourceHash,
|
|
550
|
+
return fetchSourcesByIds(sourceHash, filterHash(sourceHash, (eventSource) => isSourceDirty(eventSource, fetchRange, context)), fetchRange, false, context);
|
|
554
551
|
}
|
|
555
552
|
function isSourceDirty(eventSource, fetchRange, context) {
|
|
556
553
|
if (!doesSourceNeedRange(eventSource, context)) {
|
|
@@ -578,7 +575,7 @@ function fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, con
|
|
|
578
575
|
function fetchSource(eventSource, fetchRange, isRefetch, context) {
|
|
579
576
|
let { options, calendarApi } = context;
|
|
580
577
|
let sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId];
|
|
581
|
-
let fetchId =
|
|
578
|
+
let fetchId = guid();
|
|
582
579
|
sourceDef.fetch({
|
|
583
580
|
eventSource,
|
|
584
581
|
range: fetchRange,
|
|
@@ -631,10 +628,10 @@ function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) {
|
|
|
631
628
|
return sourceHash;
|
|
632
629
|
}
|
|
633
630
|
function excludeStaticSources(eventSources, context) {
|
|
634
|
-
return
|
|
631
|
+
return filterHash(eventSources, (eventSource) => doesSourceNeedRange(eventSource, context));
|
|
635
632
|
}
|
|
636
633
|
function parseInitialSources(rawOptions, context) {
|
|
637
|
-
let refiners =
|
|
634
|
+
let refiners = buildEventSourceRefiners(context);
|
|
638
635
|
let rawSources = [].concat(rawOptions.eventSources || []);
|
|
639
636
|
let sources = []; // parsed
|
|
640
637
|
if (rawOptions.initialEvents) {
|
|
@@ -644,7 +641,7 @@ function parseInitialSources(rawOptions, context) {
|
|
|
644
641
|
rawSources.unshift(rawOptions.events);
|
|
645
642
|
}
|
|
646
643
|
for (let rawSource of rawSources) {
|
|
647
|
-
let source =
|
|
644
|
+
let source = parseEventSource(rawSource, context, refiners);
|
|
648
645
|
if (source) {
|
|
649
646
|
sources.push(source);
|
|
650
647
|
}
|
|
@@ -778,7 +775,7 @@ theme, viewSpecs, calendarApi) {
|
|
|
778
775
|
(buttonText = viewSpec.buttonTextDefault);
|
|
779
776
|
let textFallback = viewSpec.buttonTextOverride ||
|
|
780
777
|
viewSpec.buttonTextDefault;
|
|
781
|
-
buttonHint =
|
|
778
|
+
buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride ||
|
|
782
779
|
viewSpec.buttonTitleDefault ||
|
|
783
780
|
calendarOptions.viewHint, [textFallback, buttonName], // view-name = buttonName
|
|
784
781
|
textFallback);
|
|
@@ -792,14 +789,14 @@ theme, viewSpecs, calendarApi) {
|
|
|
792
789
|
(buttonText = calendarButtonText[buttonName]); // everything else is considered default
|
|
793
790
|
if (buttonName === 'prevYear' || buttonName === 'nextYear') {
|
|
794
791
|
let prevOrNext = buttonName === 'prevYear' ? 'prev' : 'next';
|
|
795
|
-
buttonHint =
|
|
792
|
+
buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] ||
|
|
796
793
|
calendarButtonHints[prevOrNext], [
|
|
797
794
|
calendarButtonText.year || 'year',
|
|
798
795
|
'year',
|
|
799
796
|
], calendarButtonText[buttonName]);
|
|
800
797
|
}
|
|
801
798
|
else {
|
|
802
|
-
buttonHint = (navUnit) =>
|
|
799
|
+
buttonHint = (navUnit) => formatWithOrdinals(calendarButtonHintOverrides[buttonName] ||
|
|
803
800
|
calendarButtonHints[buttonName], [
|
|
804
801
|
calendarButtonText[navUnit] || navUnit,
|
|
805
802
|
navUnit,
|
|
@@ -870,7 +867,7 @@ let eventSourceDef$1 = {
|
|
|
870
867
|
fetch(arg, successCallback, errorCallback) {
|
|
871
868
|
const { dateEnv } = arg.context;
|
|
872
869
|
const func = arg.eventSource.meta;
|
|
873
|
-
|
|
870
|
+
unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), (rawEvents) => successCallback({ rawEvents }), errorCallback);
|
|
874
871
|
},
|
|
875
872
|
};
|
|
876
873
|
const funcEventSourcePlugin = createPlugin({
|
|
@@ -880,7 +877,7 @@ const funcEventSourcePlugin = createPlugin({
|
|
|
880
877
|
|
|
881
878
|
const JSON_FEED_EVENT_SOURCE_REFINERS = {
|
|
882
879
|
method: String,
|
|
883
|
-
extraParams:
|
|
880
|
+
extraParams: identity,
|
|
884
881
|
startParam: String,
|
|
885
882
|
endParam: String,
|
|
886
883
|
timeZoneParam: String,
|
|
@@ -904,7 +901,7 @@ let eventSourceDef = {
|
|
|
904
901
|
fetch(arg, successCallback, errorCallback) {
|
|
905
902
|
const { meta } = arg.eventSource;
|
|
906
903
|
const requestParams = buildRequestParams(meta, arg.range, arg.context);
|
|
907
|
-
|
|
904
|
+
requestJson(meta.method, meta.url, requestParams).then(([rawEvents, response]) => {
|
|
908
905
|
successCallback({ rawEvents, response });
|
|
909
906
|
}, errorCallback);
|
|
910
907
|
},
|
|
@@ -952,12 +949,12 @@ function buildRequestParams(meta, range, context) {
|
|
|
952
949
|
}
|
|
953
950
|
|
|
954
951
|
const SIMPLE_RECURRING_REFINERS = {
|
|
955
|
-
daysOfWeek:
|
|
956
|
-
startTime:
|
|
957
|
-
endTime:
|
|
958
|
-
duration:
|
|
959
|
-
startRecur:
|
|
960
|
-
endRecur:
|
|
952
|
+
daysOfWeek: identity,
|
|
953
|
+
startTime: createDuration,
|
|
954
|
+
endTime: createDuration,
|
|
955
|
+
duration: createDuration,
|
|
956
|
+
startRecur: identity,
|
|
957
|
+
endRecur: identity,
|
|
961
958
|
};
|
|
962
959
|
|
|
963
960
|
let recurring = {
|
|
@@ -975,7 +972,7 @@ let recurring = {
|
|
|
975
972
|
duration = refined.duration;
|
|
976
973
|
}
|
|
977
974
|
if (!duration && refined.startTime && refined.endTime) {
|
|
978
|
-
duration =
|
|
975
|
+
duration = subtractDurations(refined.endTime, refined.startTime);
|
|
979
976
|
}
|
|
980
977
|
return {
|
|
981
978
|
allDayGuess: Boolean(!refined.startTime && !refined.endTime),
|
|
@@ -986,7 +983,7 @@ let recurring = {
|
|
|
986
983
|
return null;
|
|
987
984
|
},
|
|
988
985
|
expand(typeData, framingRange, dateEnv) {
|
|
989
|
-
let clippedFramingRange =
|
|
986
|
+
let clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });
|
|
990
987
|
if (clippedFramingRange) {
|
|
991
988
|
return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv);
|
|
992
989
|
}
|
|
@@ -999,8 +996,8 @@ const simpleRecurringEventsPlugin = createPlugin({
|
|
|
999
996
|
eventRefiners: SIMPLE_RECURRING_REFINERS,
|
|
1000
997
|
});
|
|
1001
998
|
function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
|
|
1002
|
-
let dowHash = daysOfWeek ?
|
|
1003
|
-
let dayMarker =
|
|
999
|
+
let dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;
|
|
1000
|
+
let dayMarker = startOfDay(framingRange.start);
|
|
1004
1001
|
let endMarker = framingRange.end;
|
|
1005
1002
|
let instanceStarts = [];
|
|
1006
1003
|
while (dayMarker < endMarker) {
|
|
@@ -1015,7 +1012,7 @@ function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
|
|
|
1015
1012
|
}
|
|
1016
1013
|
instanceStarts.push(instanceStart);
|
|
1017
1014
|
}
|
|
1018
|
-
dayMarker =
|
|
1015
|
+
dayMarker = addDays(dayMarker, 1);
|
|
1019
1016
|
}
|
|
1020
1017
|
return instanceStarts;
|
|
1021
1018
|
}
|
|
@@ -1033,7 +1030,7 @@ const changeHandlerPlugin = createPlugin({
|
|
|
1033
1030
|
BUG: if `event` was supplied, all previously-given `eventSources` will be wiped out
|
|
1034
1031
|
*/
|
|
1035
1032
|
function handleEventSources(inputs, context) {
|
|
1036
|
-
let unfoundSources =
|
|
1033
|
+
let unfoundSources = hashValuesToArray(context.getCurrentData().eventSources);
|
|
1037
1034
|
if (unfoundSources.length === 1 &&
|
|
1038
1035
|
inputs.length === 1 &&
|
|
1039
1036
|
Array.isArray(unfoundSources[0]._raw) &&
|
|
@@ -1043,6 +1040,7 @@ function handleEventSources(inputs, context) {
|
|
|
1043
1040
|
sourceId: unfoundSources[0].sourceId,
|
|
1044
1041
|
rawEvents: inputs[0],
|
|
1045
1042
|
});
|
|
1043
|
+
return;
|
|
1046
1044
|
}
|
|
1047
1045
|
let newInputs = [];
|
|
1048
1046
|
for (let input of inputs) {
|
|
@@ -1070,13 +1068,13 @@ function handleEventSources(inputs, context) {
|
|
|
1070
1068
|
}
|
|
1071
1069
|
|
|
1072
1070
|
function handleDateProfile(dateProfile, context) {
|
|
1073
|
-
context.emitter.trigger('datesSet', Object.assign(Object.assign({},
|
|
1071
|
+
context.emitter.trigger('datesSet', Object.assign(Object.assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi }));
|
|
1074
1072
|
}
|
|
1075
1073
|
|
|
1076
1074
|
function handleEventStore(eventStore, context) {
|
|
1077
1075
|
let { emitter } = context;
|
|
1078
1076
|
if (emitter.hasHandlers('eventsSet')) {
|
|
1079
|
-
emitter.trigger('eventsSet',
|
|
1077
|
+
emitter.trigger('eventsSet', buildEventApis(eventStore, context));
|
|
1080
1078
|
}
|
|
1081
1079
|
}
|
|
1082
1080
|
|
|
@@ -1107,7 +1105,7 @@ class TaskRunner {
|
|
|
1107
1105
|
this.runTaskOption = runTaskOption;
|
|
1108
1106
|
this.drainedOption = drainedOption;
|
|
1109
1107
|
this.queue = [];
|
|
1110
|
-
this.delayedRunner = new
|
|
1108
|
+
this.delayedRunner = new DelayedRunner(this.drain.bind(this));
|
|
1111
1109
|
}
|
|
1112
1110
|
request(task, delay) {
|
|
1113
1111
|
this.queue.push(task);
|
|
@@ -1153,7 +1151,7 @@ function buildTitle(dateProfile, viewOptions, dateEnv) {
|
|
|
1153
1151
|
else { // for day units or smaller, use the actual day range
|
|
1154
1152
|
range = dateProfile.activeRange;
|
|
1155
1153
|
}
|
|
1156
|
-
return dateEnv.formatRange(range.start, range.end,
|
|
1154
|
+
return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {
|
|
1157
1155
|
isEndExclusive: dateProfile.isRangeAllDay,
|
|
1158
1156
|
defaultSeparator: viewOptions.titleRangeSeparator,
|
|
1159
1157
|
});
|
|
@@ -1168,7 +1166,7 @@ function buildTitleFormat(dateProfile) {
|
|
|
1168
1166
|
if (currentRangeUnit === 'month') {
|
|
1169
1167
|
return { year: 'numeric', month: 'long' }; // like "September 2014"
|
|
1170
1168
|
}
|
|
1171
|
-
let days =
|
|
1169
|
+
let days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);
|
|
1172
1170
|
if (days !== null && days > 1) {
|
|
1173
1171
|
// multi-day range. shorter, like "Sep 9 - 10 2014"
|
|
1174
1172
|
return { year: 'numeric', month: 'short', day: 'numeric' };
|
|
@@ -1181,22 +1179,22 @@ function buildTitleFormat(dateProfile) {
|
|
|
1181
1179
|
// also, whatever is happening in constructor, have it happen in action queue too
|
|
1182
1180
|
class CalendarDataManager {
|
|
1183
1181
|
constructor(props) {
|
|
1184
|
-
this.computeCurrentViewData =
|
|
1185
|
-
this.organizeRawLocales =
|
|
1186
|
-
this.buildLocale =
|
|
1182
|
+
this.computeCurrentViewData = memoize(this._computeCurrentViewData);
|
|
1183
|
+
this.organizeRawLocales = memoize(organizeRawLocales);
|
|
1184
|
+
this.buildLocale = memoize(buildLocale);
|
|
1187
1185
|
this.buildPluginHooks = buildBuildPluginHooks();
|
|
1188
|
-
this.buildDateEnv =
|
|
1189
|
-
this.buildTheme =
|
|
1190
|
-
this.parseToolbars =
|
|
1191
|
-
this.buildViewSpecs =
|
|
1192
|
-
this.buildDateProfileGenerator =
|
|
1193
|
-
this.buildViewApi =
|
|
1194
|
-
this.buildViewUiProps =
|
|
1195
|
-
this.buildEventUiBySource =
|
|
1196
|
-
this.buildEventUiBases =
|
|
1197
|
-
this.parseContextBusinessHours =
|
|
1198
|
-
this.buildTitle =
|
|
1199
|
-
this.emitter = new
|
|
1186
|
+
this.buildDateEnv = memoize(buildDateEnv$1);
|
|
1187
|
+
this.buildTheme = memoize(buildTheme);
|
|
1188
|
+
this.parseToolbars = memoize(parseToolbars);
|
|
1189
|
+
this.buildViewSpecs = memoize(buildViewSpecs);
|
|
1190
|
+
this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);
|
|
1191
|
+
this.buildViewApi = memoize(buildViewApi);
|
|
1192
|
+
this.buildViewUiProps = memoizeObjArg(buildViewUiProps);
|
|
1193
|
+
this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual);
|
|
1194
|
+
this.buildEventUiBases = memoize(buildEventUiBases);
|
|
1195
|
+
this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);
|
|
1196
|
+
this.buildTitle = memoize(buildTitle);
|
|
1197
|
+
this.emitter = new Emitter();
|
|
1200
1198
|
this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this));
|
|
1201
1199
|
this.currentCalendarOptionsInput = {};
|
|
1202
1200
|
this.currentCalendarOptionsRefined = {};
|
|
@@ -1220,9 +1218,9 @@ class CalendarDataManager {
|
|
|
1220
1218
|
props.calendarApi.currentDataManager = this;
|
|
1221
1219
|
this.emitter.setThisContext(props.calendarApi);
|
|
1222
1220
|
this.emitter.setOptions(currentViewData.options);
|
|
1223
|
-
let currentDate =
|
|
1221
|
+
let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);
|
|
1224
1222
|
let dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
|
|
1225
|
-
if (!
|
|
1223
|
+
if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
|
|
1226
1224
|
currentDate = dateProfile.currentRange.start;
|
|
1227
1225
|
}
|
|
1228
1226
|
let calendarContext = {
|
|
@@ -1248,8 +1246,8 @@ class CalendarDataManager {
|
|
|
1248
1246
|
businessHours: this.parseContextBusinessHours(calendarContext),
|
|
1249
1247
|
eventSources,
|
|
1250
1248
|
eventUiBases: {},
|
|
1251
|
-
eventStore:
|
|
1252
|
-
renderableEventStore:
|
|
1249
|
+
eventStore: createEmptyEventStore(),
|
|
1250
|
+
renderableEventStore: createEmptyEventStore(),
|
|
1253
1251
|
dateSelection: null,
|
|
1254
1252
|
eventSelection: '',
|
|
1255
1253
|
eventDrag: null,
|
|
@@ -1306,15 +1304,15 @@ class CalendarDataManager {
|
|
|
1306
1304
|
if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { // hack
|
|
1307
1305
|
dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
|
|
1308
1306
|
}
|
|
1309
|
-
currentDate =
|
|
1307
|
+
currentDate = reduceCurrentDate(currentDate, action);
|
|
1310
1308
|
dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator);
|
|
1311
1309
|
if (action.type === 'PREV' || // TODO: move this logic into DateProfileGenerator
|
|
1312
1310
|
action.type === 'NEXT' || // "
|
|
1313
|
-
!
|
|
1311
|
+
!rangeContainsMarker(dateProfile.currentRange, currentDate)) {
|
|
1314
1312
|
currentDate = dateProfile.currentRange.start;
|
|
1315
1313
|
}
|
|
1316
1314
|
let eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext);
|
|
1317
|
-
let eventStore =
|
|
1315
|
+
let eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext);
|
|
1318
1316
|
let isEventsLoading = computeEventSourcesLoading(eventSources); // BAD. also called in this func in computeIsLoading
|
|
1319
1317
|
let renderableEventStore = (isEventsLoading && !currentViewData.options.progressiveEventRendering) ?
|
|
1320
1318
|
(state.renderableEventStore || eventStore) : // try from previous state
|
|
@@ -1369,7 +1367,7 @@ class CalendarDataManager {
|
|
|
1369
1367
|
if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) {
|
|
1370
1368
|
// hack
|
|
1371
1369
|
state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data);
|
|
1372
|
-
state.eventStore = data.eventStore =
|
|
1370
|
+
state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv);
|
|
1373
1371
|
}
|
|
1374
1372
|
for (let optionName in changeHandlers) {
|
|
1375
1373
|
if (this.optionsForHandling.indexOf(optionName) !== -1 ||
|
|
@@ -1409,8 +1407,8 @@ class CalendarDataManager {
|
|
|
1409
1407
|
}
|
|
1410
1408
|
// always called from behind a memoizer
|
|
1411
1409
|
processRawCalendarOptions(optionOverrides, dynamicOptionOverrides) {
|
|
1412
|
-
let { locales, locale } =
|
|
1413
|
-
|
|
1410
|
+
let { locales, locale } = mergeRawOptions([
|
|
1411
|
+
BASE_OPTION_DEFAULTS,
|
|
1414
1412
|
optionOverrides,
|
|
1415
1413
|
dynamicOptionOverrides,
|
|
1416
1414
|
]);
|
|
@@ -1418,10 +1416,10 @@ class CalendarDataManager {
|
|
|
1418
1416
|
let availableRawLocales = availableLocaleData.map;
|
|
1419
1417
|
let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;
|
|
1420
1418
|
let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);
|
|
1421
|
-
let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
1419
|
+
let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
|
|
1422
1420
|
let extra = {};
|
|
1423
|
-
let raw =
|
|
1424
|
-
|
|
1421
|
+
let raw = mergeRawOptions([
|
|
1422
|
+
BASE_OPTION_DEFAULTS,
|
|
1425
1423
|
localeDefaults,
|
|
1426
1424
|
optionOverrides,
|
|
1427
1425
|
dynamicOptionOverrides,
|
|
@@ -1431,9 +1429,9 @@ class CalendarDataManager {
|
|
|
1431
1429
|
let currentRefined = this.currentCalendarOptionsRefined;
|
|
1432
1430
|
let anyChanges = false;
|
|
1433
1431
|
for (let optionName in raw) {
|
|
1434
|
-
if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (
|
|
1432
|
+
if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1435
1433
|
(optionName in currentRaw) &&
|
|
1436
|
-
|
|
1434
|
+
COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])))) {
|
|
1437
1435
|
refined[optionName] = currentRefined[optionName];
|
|
1438
1436
|
}
|
|
1439
1437
|
else if (refiners[optionName]) {
|
|
@@ -1492,15 +1490,15 @@ class CalendarDataManager {
|
|
|
1492
1490
|
return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi };
|
|
1493
1491
|
}
|
|
1494
1492
|
processRawViewOptions(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {
|
|
1495
|
-
let raw =
|
|
1496
|
-
|
|
1493
|
+
let raw = mergeRawOptions([
|
|
1494
|
+
BASE_OPTION_DEFAULTS,
|
|
1497
1495
|
viewSpec.optionDefaults,
|
|
1498
1496
|
localeDefaults,
|
|
1499
1497
|
optionOverrides,
|
|
1500
1498
|
viewSpec.optionOverrides,
|
|
1501
1499
|
dynamicOptionOverrides,
|
|
1502
1500
|
]);
|
|
1503
|
-
let refiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
1501
|
+
let refiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), VIEW_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
|
|
1504
1502
|
let refined = {};
|
|
1505
1503
|
let currentRaw = this.currentViewOptionsInput;
|
|
1506
1504
|
let currentRefined = this.currentViewOptionsRefined;
|
|
@@ -1508,14 +1506,14 @@ class CalendarDataManager {
|
|
|
1508
1506
|
let extra = {};
|
|
1509
1507
|
for (let optionName in raw) {
|
|
1510
1508
|
if (raw[optionName] === currentRaw[optionName] ||
|
|
1511
|
-
(
|
|
1512
|
-
|
|
1509
|
+
(COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1510
|
+
COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName]))) {
|
|
1513
1511
|
refined[optionName] = currentRefined[optionName];
|
|
1514
1512
|
}
|
|
1515
1513
|
else {
|
|
1516
1514
|
if (raw[optionName] === this.currentCalendarOptionsInput[optionName] ||
|
|
1517
|
-
(
|
|
1518
|
-
|
|
1515
|
+
(COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1516
|
+
COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], this.currentCalendarOptionsInput[optionName]))) {
|
|
1519
1517
|
if (optionName in this.currentCalendarOptionsRefined) { // might be an "extra" prop
|
|
1520
1518
|
refined[optionName] = this.currentCalendarOptionsRefined[optionName];
|
|
1521
1519
|
}
|
|
@@ -1542,7 +1540,7 @@ class CalendarDataManager {
|
|
|
1542
1540
|
}
|
|
1543
1541
|
function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) {
|
|
1544
1542
|
let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);
|
|
1545
|
-
return new
|
|
1543
|
+
return new DateEnv({
|
|
1546
1544
|
calendarSystem: 'gregory',
|
|
1547
1545
|
timeZone,
|
|
1548
1546
|
namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl,
|
|
@@ -1559,14 +1557,14 @@ function buildTheme(options, pluginHooks) {
|
|
|
1559
1557
|
return new ThemeClass(options);
|
|
1560
1558
|
}
|
|
1561
1559
|
function buildDateProfileGenerator(props) {
|
|
1562
|
-
let DateProfileGeneratorClass = props.dateProfileGeneratorClass ||
|
|
1560
|
+
let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;
|
|
1563
1561
|
return new DateProfileGeneratorClass(props);
|
|
1564
1562
|
}
|
|
1565
1563
|
function buildViewApi(type, getCurrentData, dateEnv) {
|
|
1566
1564
|
return new ViewImpl(type, getCurrentData, dateEnv);
|
|
1567
1565
|
}
|
|
1568
1566
|
function buildEventUiBySource(eventSources) {
|
|
1569
|
-
return
|
|
1567
|
+
return mapHash(eventSources, (eventSource) => eventSource.ui);
|
|
1570
1568
|
}
|
|
1571
1569
|
function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
|
|
1572
1570
|
let eventUiBases = { '': eventUiSingleBase };
|
|
@@ -1581,7 +1579,7 @@ function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
|
|
|
1581
1579
|
function buildViewUiProps(calendarContext) {
|
|
1582
1580
|
let { options } = calendarContext;
|
|
1583
1581
|
return {
|
|
1584
|
-
eventUiSingleBase:
|
|
1582
|
+
eventUiSingleBase: createEventUi({
|
|
1585
1583
|
display: options.eventDisplay,
|
|
1586
1584
|
editable: options.editable,
|
|
1587
1585
|
startEditable: options.eventStartEditable,
|
|
@@ -1595,7 +1593,7 @@ function buildViewUiProps(calendarContext) {
|
|
|
1595
1593
|
color: options.eventColor,
|
|
1596
1594
|
// classNames: options.eventClassNames // render hook will handle this
|
|
1597
1595
|
}, calendarContext),
|
|
1598
|
-
selectionConfig:
|
|
1596
|
+
selectionConfig: createEventUi({
|
|
1599
1597
|
constraint: options.selectConstraint,
|
|
1600
1598
|
overlap: typeof options.selectOverlap === 'boolean' ? options.selectOverlap : undefined,
|
|
1601
1599
|
allow: options.selectAllow,
|
|
@@ -1611,7 +1609,7 @@ function computeIsLoading(state, context) {
|
|
|
1611
1609
|
return false;
|
|
1612
1610
|
}
|
|
1613
1611
|
function parseContextBusinessHours(calendarContext) {
|
|
1614
|
-
return
|
|
1612
|
+
return parseBusinessHours(calendarContext.options.businessHours, calendarContext);
|
|
1615
1613
|
}
|
|
1616
1614
|
function warnUnknownOptions(options, viewName) {
|
|
1617
1615
|
for (let optionName in options) {
|
|
@@ -1620,10 +1618,10 @@ function warnUnknownOptions(options, viewName) {
|
|
|
1620
1618
|
}
|
|
1621
1619
|
}
|
|
1622
1620
|
|
|
1623
|
-
class ToolbarSection extends
|
|
1621
|
+
class ToolbarSection extends BaseComponent {
|
|
1624
1622
|
render() {
|
|
1625
1623
|
let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
|
|
1626
|
-
return
|
|
1624
|
+
return createElement('div', { className: 'fc-toolbar-chunk' }, ...children);
|
|
1627
1625
|
}
|
|
1628
1626
|
renderWidgetGroup(widgetGroup) {
|
|
1629
1627
|
let { props } = this;
|
|
@@ -1634,7 +1632,7 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1634
1632
|
let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
|
|
1635
1633
|
if (buttonName === 'title') {
|
|
1636
1634
|
isOnlyButtons = false;
|
|
1637
|
-
children.push(
|
|
1635
|
+
children.push(createElement("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title));
|
|
1638
1636
|
}
|
|
1639
1637
|
else {
|
|
1640
1638
|
let isPressed = buttonName === props.activeButton;
|
|
@@ -1645,18 +1643,18 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1645
1643
|
if (isPressed) {
|
|
1646
1644
|
buttonClasses.push(theme.getClass('buttonActive'));
|
|
1647
1645
|
}
|
|
1648
|
-
children.push(
|
|
1646
|
+
children.push(createElement("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? createElement("span", { className: buttonIcon }) : '')));
|
|
1649
1647
|
}
|
|
1650
1648
|
}
|
|
1651
1649
|
if (children.length > 1) {
|
|
1652
1650
|
let groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || '';
|
|
1653
|
-
return
|
|
1651
|
+
return createElement('div', { className: groupClassName }, ...children);
|
|
1654
1652
|
}
|
|
1655
1653
|
return children[0];
|
|
1656
1654
|
}
|
|
1657
1655
|
}
|
|
1658
1656
|
|
|
1659
|
-
class Toolbar extends
|
|
1657
|
+
class Toolbar extends BaseComponent {
|
|
1660
1658
|
render() {
|
|
1661
1659
|
let { model, extraClassName } = this.props;
|
|
1662
1660
|
let forceLtr = false;
|
|
@@ -1683,18 +1681,18 @@ class Toolbar extends internalCommon.BaseComponent {
|
|
|
1683
1681
|
'fc-toolbar',
|
|
1684
1682
|
forceLtr ? 'fc-toolbar-ltr' : '',
|
|
1685
1683
|
];
|
|
1686
|
-
return (
|
|
1684
|
+
return (createElement("div", { className: classNames.join(' ') },
|
|
1687
1685
|
this.renderSection('start', startContent || []),
|
|
1688
1686
|
this.renderSection('center', centerContent || []),
|
|
1689
1687
|
this.renderSection('end', endContent || [])));
|
|
1690
1688
|
}
|
|
1691
1689
|
renderSection(key, widgetGroups) {
|
|
1692
1690
|
let { props } = this;
|
|
1693
|
-
return (
|
|
1691
|
+
return (createElement(ToolbarSection, { key: key, widgetGroups: widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled, titleId: props.titleId }));
|
|
1694
1692
|
}
|
|
1695
1693
|
}
|
|
1696
1694
|
|
|
1697
|
-
class ViewHarness extends
|
|
1695
|
+
class ViewHarness extends BaseComponent {
|
|
1698
1696
|
constructor() {
|
|
1699
1697
|
super(...arguments);
|
|
1700
1698
|
this.state = {
|
|
@@ -1702,7 +1700,7 @@ class ViewHarness extends internalCommon.BaseComponent {
|
|
|
1702
1700
|
};
|
|
1703
1701
|
this.handleEl = (el) => {
|
|
1704
1702
|
this.el = el;
|
|
1705
|
-
|
|
1703
|
+
setRef(this.props.elRef, el);
|
|
1706
1704
|
this.updateAvailableWidth();
|
|
1707
1705
|
};
|
|
1708
1706
|
this.handleResize = () => {
|
|
@@ -1735,7 +1733,7 @@ class ViewHarness extends internalCommon.BaseComponent {
|
|
|
1735
1733
|
else {
|
|
1736
1734
|
height = props.height || '';
|
|
1737
1735
|
}
|
|
1738
|
-
return (
|
|
1736
|
+
return (createElement("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height, paddingBottom } }, props.children));
|
|
1739
1737
|
}
|
|
1740
1738
|
componentDidMount() {
|
|
1741
1739
|
this.context.addResizeHandler(this.handleResize);
|
|
@@ -1755,22 +1753,22 @@ class ViewHarness extends internalCommon.BaseComponent {
|
|
|
1755
1753
|
/*
|
|
1756
1754
|
Detects when the user clicks on an event within a DateComponent
|
|
1757
1755
|
*/
|
|
1758
|
-
class EventClicking extends
|
|
1756
|
+
class EventClicking extends Interaction {
|
|
1759
1757
|
constructor(settings) {
|
|
1760
1758
|
super(settings);
|
|
1761
1759
|
this.handleSegClick = (ev, segEl) => {
|
|
1762
1760
|
let { component } = this;
|
|
1763
1761
|
let { context } = component;
|
|
1764
|
-
let seg =
|
|
1762
|
+
let seg = getElSeg(segEl);
|
|
1765
1763
|
if (seg && // might be the <div> surrounding the more link
|
|
1766
1764
|
component.isValidSegDownEl(ev.target)) {
|
|
1767
1765
|
// our way to simulate a link click for elements that can't be <a> tags
|
|
1768
1766
|
// grab before trigger fired in case trigger trashes DOM thru rerendering
|
|
1769
|
-
let hasUrlContainer =
|
|
1767
|
+
let hasUrlContainer = elementClosest(ev.target, '.fc-event-forced-url');
|
|
1770
1768
|
let url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';
|
|
1771
1769
|
context.emitter.trigger('eventClick', {
|
|
1772
1770
|
el: segEl,
|
|
1773
|
-
event: new
|
|
1771
|
+
event: new EventImpl(component.context, seg.eventRange.def, seg.eventRange.instance),
|
|
1774
1772
|
jsEvent: ev,
|
|
1775
1773
|
view: context.viewApi,
|
|
1776
1774
|
});
|
|
@@ -1779,7 +1777,7 @@ class EventClicking extends internalCommon.Interaction {
|
|
|
1779
1777
|
}
|
|
1780
1778
|
}
|
|
1781
1779
|
};
|
|
1782
|
-
this.destroy =
|
|
1780
|
+
this.destroy = listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events
|
|
1783
1781
|
this.handleSegClick);
|
|
1784
1782
|
}
|
|
1785
1783
|
}
|
|
@@ -1788,7 +1786,7 @@ class EventClicking extends internalCommon.Interaction {
|
|
|
1788
1786
|
Triggers events and adds/removes core classNames when the user's pointer
|
|
1789
1787
|
enters/leaves event-elements of a component.
|
|
1790
1788
|
*/
|
|
1791
|
-
class EventHovering extends
|
|
1789
|
+
class EventHovering extends Interaction {
|
|
1792
1790
|
constructor(settings) {
|
|
1793
1791
|
super(settings);
|
|
1794
1792
|
// for simulating an eventMouseLeave when the event el is destroyed while mouse is over it
|
|
@@ -1798,7 +1796,7 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1798
1796
|
}
|
|
1799
1797
|
};
|
|
1800
1798
|
this.handleSegEnter = (ev, segEl) => {
|
|
1801
|
-
if (
|
|
1799
|
+
if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
|
|
1802
1800
|
this.currentSegEl = segEl;
|
|
1803
1801
|
this.triggerEvent('eventMouseEnter', ev, segEl);
|
|
1804
1802
|
}
|
|
@@ -1809,7 +1807,7 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1809
1807
|
this.triggerEvent('eventMouseLeave', ev, segEl);
|
|
1810
1808
|
}
|
|
1811
1809
|
};
|
|
1812
|
-
this.removeHoverListeners =
|
|
1810
|
+
this.removeHoverListeners = listenToHoverBySelector(settings.el, '.fc-event', // on both fg and bg events
|
|
1813
1811
|
this.handleSegEnter, this.handleSegLeave);
|
|
1814
1812
|
}
|
|
1815
1813
|
destroy() {
|
|
@@ -1818,11 +1816,11 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1818
1816
|
triggerEvent(publicEvName, ev, segEl) {
|
|
1819
1817
|
let { component } = this;
|
|
1820
1818
|
let { context } = component;
|
|
1821
|
-
let seg =
|
|
1819
|
+
let seg = getElSeg(segEl);
|
|
1822
1820
|
if (!ev || component.isValidSegDownEl(ev.target)) {
|
|
1823
1821
|
context.emitter.trigger(publicEvName, {
|
|
1824
1822
|
el: segEl,
|
|
1825
|
-
event: new
|
|
1823
|
+
event: new EventImpl(context, seg.eventRange.def, seg.eventRange.instance),
|
|
1826
1824
|
jsEvent: ev,
|
|
1827
1825
|
view: context.viewApi,
|
|
1828
1826
|
});
|
|
@@ -1830,23 +1828,23 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1830
1828
|
}
|
|
1831
1829
|
}
|
|
1832
1830
|
|
|
1833
|
-
class CalendarContent extends
|
|
1831
|
+
class CalendarContent extends PureComponent {
|
|
1834
1832
|
constructor() {
|
|
1835
1833
|
super(...arguments);
|
|
1836
|
-
this.buildViewContext =
|
|
1837
|
-
this.buildViewPropTransformers =
|
|
1838
|
-
this.buildToolbarProps =
|
|
1839
|
-
this.headerRef =
|
|
1840
|
-
this.footerRef =
|
|
1834
|
+
this.buildViewContext = memoize(buildViewContext);
|
|
1835
|
+
this.buildViewPropTransformers = memoize(buildViewPropTransformers);
|
|
1836
|
+
this.buildToolbarProps = memoize(buildToolbarProps);
|
|
1837
|
+
this.headerRef = createRef();
|
|
1838
|
+
this.footerRef = createRef();
|
|
1841
1839
|
this.interactionsStore = {};
|
|
1842
1840
|
// eslint-disable-next-line
|
|
1843
1841
|
this.state = {
|
|
1844
|
-
viewLabelId:
|
|
1842
|
+
viewLabelId: getUniqueDomId(),
|
|
1845
1843
|
};
|
|
1846
1844
|
// Component Registration
|
|
1847
1845
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1848
1846
|
this.registerInteractiveComponent = (component, settingsInput) => {
|
|
1849
|
-
let settings =
|
|
1847
|
+
let settings = parseInteractionSettings(component, settingsInput);
|
|
1850
1848
|
let DEFAULT_INTERACTIONS = [
|
|
1851
1849
|
EventClicking,
|
|
1852
1850
|
EventHovering,
|
|
@@ -1854,7 +1852,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1854
1852
|
let interactionClasses = DEFAULT_INTERACTIONS.concat(this.props.pluginHooks.componentInteractions);
|
|
1855
1853
|
let interactions = interactionClasses.map((TheInteractionClass) => new TheInteractionClass(settings));
|
|
1856
1854
|
this.interactionsStore[component.uid] = interactions;
|
|
1857
|
-
|
|
1855
|
+
interactionSettingsStore[component.uid] = settings;
|
|
1858
1856
|
};
|
|
1859
1857
|
this.unregisterInteractiveComponent = (component) => {
|
|
1860
1858
|
let listeners = this.interactionsStore[component.uid];
|
|
@@ -1864,11 +1862,11 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1864
1862
|
}
|
|
1865
1863
|
delete this.interactionsStore[component.uid];
|
|
1866
1864
|
}
|
|
1867
|
-
delete
|
|
1865
|
+
delete interactionSettingsStore[component.uid];
|
|
1868
1866
|
};
|
|
1869
1867
|
// Resizing
|
|
1870
1868
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1871
|
-
this.resizeRunner = new
|
|
1869
|
+
this.resizeRunner = new DelayedRunner(() => {
|
|
1872
1870
|
this.props.emitter.trigger('_resize', true); // should window resizes be considered "forced" ?
|
|
1873
1871
|
this.props.emitter.trigger('windowResize', { view: this.props.viewApi });
|
|
1874
1872
|
});
|
|
@@ -1887,7 +1885,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1887
1885
|
render() {
|
|
1888
1886
|
let { props } = this;
|
|
1889
1887
|
let { toolbarConfig, options } = props;
|
|
1890
|
-
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate,
|
|
1888
|
+
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
|
|
1891
1889
|
props.viewTitle);
|
|
1892
1890
|
let viewVGrow = false;
|
|
1893
1891
|
let viewHeight = '';
|
|
@@ -1908,12 +1906,12 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1908
1906
|
let viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)
|
|
1909
1907
|
? this.state.viewLabelId
|
|
1910
1908
|
: '';
|
|
1911
|
-
return (
|
|
1912
|
-
toolbarConfig.header && (
|
|
1913
|
-
|
|
1909
|
+
return (createElement(ViewContextType.Provider, { value: viewContext },
|
|
1910
|
+
toolbarConfig.header && (createElement(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
|
|
1911
|
+
createElement(ViewHarness, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
|
|
1914
1912
|
this.renderView(props),
|
|
1915
1913
|
this.buildAppendContent()),
|
|
1916
|
-
toolbarConfig.footer && (
|
|
1914
|
+
toolbarConfig.footer && (createElement(Toolbar, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
|
|
1917
1915
|
}
|
|
1918
1916
|
componentDidMount() {
|
|
1919
1917
|
let { props } = this;
|
|
@@ -1945,7 +1943,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1945
1943
|
buildAppendContent() {
|
|
1946
1944
|
let { props } = this;
|
|
1947
1945
|
let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
|
|
1948
|
-
return
|
|
1946
|
+
return createElement(Fragment, {}, ...children);
|
|
1949
1947
|
}
|
|
1950
1948
|
renderView(props) {
|
|
1951
1949
|
let { pluginHooks } = props;
|
|
@@ -1967,7 +1965,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1967
1965
|
Object.assign(viewProps, transformer.transform(viewProps, props));
|
|
1968
1966
|
}
|
|
1969
1967
|
let ViewComponent = viewSpec.component;
|
|
1970
|
-
return (
|
|
1968
|
+
return (createElement(ViewComponent, Object.assign({}, viewProps)));
|
|
1971
1969
|
}
|
|
1972
1970
|
}
|
|
1973
1971
|
function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
|
|
@@ -1979,7 +1977,7 @@ function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentD
|
|
|
1979
1977
|
title,
|
|
1980
1978
|
activeButton: viewSpec.type,
|
|
1981
1979
|
navUnit: viewSpec.singleUnit,
|
|
1982
|
-
isTodayEnabled: todayInfo.isValid && !
|
|
1980
|
+
isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
|
|
1983
1981
|
isPrevEnabled: prevInfo.isValid,
|
|
1984
1982
|
isNextEnabled: nextInfo.isValid,
|
|
1985
1983
|
};
|
|
@@ -1990,7 +1988,7 @@ function buildViewPropTransformers(theClasses) {
|
|
|
1990
1988
|
return theClasses.map((TheClass) => new TheClass());
|
|
1991
1989
|
}
|
|
1992
1990
|
|
|
1993
|
-
class Calendar extends
|
|
1991
|
+
class Calendar extends CalendarImpl {
|
|
1994
1992
|
constructor(el, optionOverrides = {}) {
|
|
1995
1993
|
super();
|
|
1996
1994
|
this.isRendering = false;
|
|
@@ -2013,25 +2011,25 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2013
2011
|
if (this.isRendering) {
|
|
2014
2012
|
this.isRendered = true;
|
|
2015
2013
|
let { currentData } = this;
|
|
2016
|
-
|
|
2017
|
-
|
|
2014
|
+
flushSync(() => {
|
|
2015
|
+
render(createElement(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, isHeightAuto, forPrint) => {
|
|
2018
2016
|
this.setClassNames(classNames);
|
|
2019
2017
|
this.setHeight(height);
|
|
2020
|
-
return (
|
|
2021
|
-
|
|
2018
|
+
return (createElement(RenderId.Provider, { value: this.customContentRenderId },
|
|
2019
|
+
createElement(CalendarContent, Object.assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData))));
|
|
2022
2020
|
}), this.el);
|
|
2023
2021
|
});
|
|
2024
2022
|
}
|
|
2025
2023
|
else if (this.isRendered) {
|
|
2026
2024
|
this.isRendered = false;
|
|
2027
|
-
|
|
2025
|
+
render(null, this.el);
|
|
2028
2026
|
this.setClassNames([]);
|
|
2029
2027
|
this.setHeight('');
|
|
2030
2028
|
}
|
|
2031
2029
|
};
|
|
2032
|
-
|
|
2030
|
+
ensureElHasStyles(el);
|
|
2033
2031
|
this.el = el;
|
|
2034
|
-
this.renderRunner = new
|
|
2032
|
+
this.renderRunner = new DelayedRunner(this.handleRenderRequest);
|
|
2035
2033
|
new CalendarDataManager({
|
|
2036
2034
|
optionOverrides,
|
|
2037
2035
|
calendarApi: this,
|
|
@@ -2059,7 +2057,7 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2059
2057
|
}
|
|
2060
2058
|
}
|
|
2061
2059
|
updateSize() {
|
|
2062
|
-
|
|
2060
|
+
flushSync(() => {
|
|
2063
2061
|
super.updateSize();
|
|
2064
2062
|
});
|
|
2065
2063
|
}
|
|
@@ -2078,7 +2076,7 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2078
2076
|
this.currentDataManager.resetOptions(optionOverrides, changedOptionNames);
|
|
2079
2077
|
}
|
|
2080
2078
|
setClassNames(classNames) {
|
|
2081
|
-
if (!
|
|
2079
|
+
if (!isArraysEqual(classNames, this.currentClassNames)) {
|
|
2082
2080
|
let { classList } = this.el;
|
|
2083
2081
|
for (let className of this.currentClassNames) {
|
|
2084
2082
|
classList.remove(className);
|
|
@@ -2090,13 +2088,13 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2090
2088
|
}
|
|
2091
2089
|
}
|
|
2092
2090
|
setHeight(height) {
|
|
2093
|
-
|
|
2091
|
+
applyStyleProp(this.el, 'height', height);
|
|
2094
2092
|
}
|
|
2095
2093
|
}
|
|
2096
2094
|
|
|
2097
2095
|
function formatDate(dateInput, options = {}) {
|
|
2098
2096
|
let dateEnv = buildDateEnv(options);
|
|
2099
|
-
let formatter =
|
|
2097
|
+
let formatter = createFormatter(options);
|
|
2100
2098
|
let dateMeta = dateEnv.createMarkerMeta(dateInput);
|
|
2101
2099
|
if (!dateMeta) { // TODO: warning?
|
|
2102
2100
|
return '';
|
|
@@ -2107,7 +2105,7 @@ function formatDate(dateInput, options = {}) {
|
|
|
2107
2105
|
}
|
|
2108
2106
|
function formatRange(startInput, endInput, options) {
|
|
2109
2107
|
let dateEnv = buildDateEnv(typeof options === 'object' && options ? options : {}); // pass in if non-null object
|
|
2110
|
-
let formatter =
|
|
2108
|
+
let formatter = createFormatter(options);
|
|
2111
2109
|
let startMeta = dateEnv.createMarkerMeta(startInput);
|
|
2112
2110
|
let endMeta = dateEnv.createMarkerMeta(endInput);
|
|
2113
2111
|
if (!startMeta || !endMeta) { // TODO: warning?
|
|
@@ -2117,13 +2115,13 @@ function formatRange(startInput, endInput, options) {
|
|
|
2117
2115
|
forcedStartTzo: startMeta.forcedTzo,
|
|
2118
2116
|
forcedEndTzo: endMeta.forcedTzo,
|
|
2119
2117
|
isEndExclusive: options.isEndExclusive,
|
|
2120
|
-
defaultSeparator:
|
|
2118
|
+
defaultSeparator: BASE_OPTION_DEFAULTS.defaultRangeSeparator,
|
|
2121
2119
|
});
|
|
2122
2120
|
}
|
|
2123
2121
|
// TODO: more DRY and optimized
|
|
2124
2122
|
function buildDateEnv(settings) {
|
|
2125
2123
|
let locale = buildLocale(settings.locale || 'en', organizeRawLocales([]).map); // TODO: don't hardcode 'en' everywhere
|
|
2126
|
-
return new
|
|
2124
|
+
return new DateEnv(Object.assign(Object.assign({ timeZone: BASE_OPTION_DEFAULTS.timeZone, calendarSystem: 'gregory' }, settings), { locale }));
|
|
2127
2125
|
}
|
|
2128
2126
|
|
|
2129
2127
|
// HELPERS
|
|
@@ -2132,17 +2130,9 @@ if nextDayThreshold is specified, slicing is done in an all-day fashion.
|
|
|
2132
2130
|
you can get nextDayThreshold from context.nextDayThreshold
|
|
2133
2131
|
*/
|
|
2134
2132
|
function sliceEvents(props, allDay) {
|
|
2135
|
-
return
|
|
2133
|
+
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
2136
2134
|
}
|
|
2137
2135
|
|
|
2138
|
-
const version = '6.1.
|
|
2136
|
+
const version = '6.1.3';
|
|
2139
2137
|
|
|
2140
|
-
|
|
2141
|
-
exports.Calendar = Calendar;
|
|
2142
|
-
exports.createPlugin = createPlugin;
|
|
2143
|
-
exports.formatDate = formatDate;
|
|
2144
|
-
exports.formatRange = formatRange;
|
|
2145
|
-
exports.globalLocales = globalLocales;
|
|
2146
|
-
exports.globalPlugins = globalPlugins;
|
|
2147
|
-
exports.sliceEvents = sliceEvents;
|
|
2148
|
-
exports.version = version;
|
|
2138
|
+
export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
|