@fullcalendar/core 6.0.2 → 6.0.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.cjs → index.esm.js} +147 -158
- package/index.global.js +31 -8
- package/index.global.min.js +2 -2
- package/index.js +158 -147
- package/internal-common.d.ts +9 -7
- package/{internal-common.cjs → internal-common.esm.js} +4742 -4955
- package/internal-common.js +4930 -4671
- package/internal.esm.js +3 -0
- package/internal.js +196 -3
- package/locales/{af.cjs → af.esm.js} +1 -5
- package/locales/af.global.js +1 -1
- package/locales/af.global.min.js +1 -1
- package/locales/af.js +5 -1
- package/locales/{ar-dz.cjs → ar-dz.esm.js} +1 -5
- package/locales/ar-dz.global.js +1 -1
- package/locales/ar-dz.global.min.js +1 -1
- package/locales/ar-dz.js +5 -1
- package/locales/{ar-kw.cjs → ar-kw.esm.js} +1 -5
- package/locales/ar-kw.global.js +1 -1
- package/locales/ar-kw.global.min.js +1 -1
- package/locales/ar-kw.js +5 -1
- package/locales/{ar-ly.cjs → ar-ly.esm.js} +1 -5
- package/locales/ar-ly.global.js +1 -1
- package/locales/ar-ly.global.min.js +1 -1
- package/locales/ar-ly.js +5 -1
- package/locales/{ar-ma.cjs → ar-ma.esm.js} +1 -5
- package/locales/ar-ma.global.js +1 -1
- package/locales/ar-ma.global.min.js +1 -1
- package/locales/ar-ma.js +5 -1
- package/locales/{ar-sa.cjs → ar-sa.esm.js} +1 -5
- package/locales/ar-sa.global.js +1 -1
- package/locales/ar-sa.global.min.js +1 -1
- package/locales/ar-sa.js +5 -1
- package/locales/{ar-tn.cjs → ar-tn.esm.js} +1 -5
- package/locales/ar-tn.global.js +1 -1
- package/locales/ar-tn.global.min.js +1 -1
- package/locales/ar-tn.js +5 -1
- package/locales/{ar.cjs → ar.esm.js} +1 -5
- package/locales/ar.global.js +1 -1
- package/locales/ar.global.min.js +1 -1
- package/locales/ar.js +5 -1
- package/locales/{az.cjs → az.esm.js} +1 -5
- package/locales/az.global.js +1 -1
- package/locales/az.global.min.js +1 -1
- package/locales/az.js +5 -1
- package/locales/{bg.cjs → bg.esm.js} +1 -5
- package/locales/bg.global.js +1 -1
- package/locales/bg.global.min.js +1 -1
- package/locales/bg.js +5 -1
- package/locales/{bn.cjs → bn.esm.js} +1 -5
- package/locales/bn.global.js +1 -1
- package/locales/bn.global.min.js +1 -1
- package/locales/bn.js +5 -1
- package/locales/{bs.cjs → bs.esm.js} +1 -5
- package/locales/bs.global.js +1 -1
- package/locales/bs.global.min.js +1 -1
- package/locales/bs.js +5 -1
- package/locales/{ca.cjs → ca.esm.js} +1 -5
- package/locales/ca.global.js +1 -1
- package/locales/ca.global.min.js +1 -1
- package/locales/ca.js +5 -1
- package/locales/{cs.cjs → cs.esm.js} +1 -5
- package/locales/cs.global.js +1 -1
- package/locales/cs.global.min.js +1 -1
- package/locales/cs.js +5 -1
- package/locales/{cy.cjs → cy.esm.js} +1 -5
- package/locales/cy.global.js +1 -1
- package/locales/cy.global.min.js +1 -1
- package/locales/cy.js +5 -1
- package/locales/{da.cjs → da.esm.js} +1 -5
- package/locales/da.global.js +1 -1
- package/locales/da.global.min.js +1 -1
- package/locales/da.js +5 -1
- package/locales/{de-at.cjs → de-at.esm.js} +1 -5
- package/locales/de-at.global.js +1 -1
- package/locales/de-at.global.min.js +1 -1
- package/locales/de-at.js +5 -1
- package/locales/{de.cjs → de.esm.js} +1 -5
- package/locales/de.global.js +1 -1
- package/locales/de.global.min.js +1 -1
- package/locales/de.js +5 -1
- package/locales/{el.cjs → el.esm.js} +1 -5
- package/locales/el.global.js +1 -1
- package/locales/el.global.min.js +1 -1
- package/locales/el.js +5 -1
- package/locales/{en-au.cjs → en-au.esm.js} +1 -5
- package/locales/en-au.global.js +1 -1
- package/locales/en-au.global.min.js +1 -1
- package/locales/en-au.js +5 -1
- package/locales/{en-gb.cjs → en-gb.esm.js} +1 -5
- package/locales/en-gb.global.js +1 -1
- package/locales/en-gb.global.min.js +1 -1
- package/locales/en-gb.js +5 -1
- package/locales/{en-nz.cjs → en-nz.esm.js} +1 -5
- package/locales/en-nz.global.js +1 -1
- package/locales/en-nz.global.min.js +1 -1
- package/locales/en-nz.js +5 -1
- package/locales/{eo.cjs → eo.esm.js} +1 -5
- package/locales/eo.global.js +1 -1
- package/locales/eo.global.min.js +1 -1
- package/locales/eo.js +5 -1
- package/locales/{es-us.cjs → es-us.esm.js} +1 -5
- package/locales/es-us.global.js +1 -1
- package/locales/es-us.global.min.js +1 -1
- package/locales/es-us.js +5 -1
- package/locales/{es.cjs → es.esm.js} +1 -5
- package/locales/es.global.js +1 -1
- package/locales/es.global.min.js +1 -1
- package/locales/es.js +5 -1
- package/locales/{et.cjs → et.esm.js} +1 -5
- package/locales/et.global.js +1 -1
- package/locales/et.global.min.js +1 -1
- package/locales/et.js +5 -1
- package/locales/{eu.cjs → eu.esm.js} +1 -5
- package/locales/eu.global.js +1 -1
- package/locales/eu.global.min.js +1 -1
- package/locales/eu.js +5 -1
- package/locales/{fa.cjs → fa.esm.js} +1 -5
- package/locales/fa.global.js +1 -1
- package/locales/fa.global.min.js +1 -1
- package/locales/fa.js +5 -1
- package/locales/{fi.cjs → fi.esm.js} +1 -5
- package/locales/fi.global.js +1 -1
- package/locales/fi.global.min.js +1 -1
- package/locales/fi.js +5 -1
- package/locales/{fr-ca.cjs → fr-ca.esm.js} +1 -5
- package/locales/fr-ca.global.js +1 -1
- package/locales/fr-ca.global.min.js +1 -1
- package/locales/fr-ca.js +5 -1
- package/locales/{fr-ch.cjs → fr-ch.esm.js} +1 -5
- package/locales/fr-ch.global.js +1 -1
- package/locales/fr-ch.global.min.js +1 -1
- package/locales/fr-ch.js +5 -1
- package/locales/{fr.cjs → fr.esm.js} +1 -5
- package/locales/fr.global.js +1 -1
- package/locales/fr.global.min.js +1 -1
- package/locales/fr.js +5 -1
- package/locales/{gl.cjs → gl.esm.js} +1 -5
- package/locales/gl.global.js +1 -1
- package/locales/gl.global.min.js +1 -1
- package/locales/gl.js +5 -1
- package/locales/{he.cjs → he.esm.js} +1 -5
- package/locales/he.global.js +1 -1
- package/locales/he.global.min.js +1 -1
- package/locales/he.js +5 -1
- package/locales/{hi.cjs → hi.esm.js} +1 -5
- package/locales/hi.global.js +1 -1
- package/locales/hi.global.min.js +1 -1
- package/locales/hi.js +5 -1
- package/locales/{hr.cjs → hr.esm.js} +1 -5
- package/locales/hr.global.js +1 -1
- package/locales/hr.global.min.js +1 -1
- package/locales/hr.js +5 -1
- package/locales/{hu.cjs → hu.esm.js} +1 -5
- package/locales/hu.global.js +1 -1
- package/locales/hu.global.min.js +1 -1
- package/locales/hu.js +5 -1
- package/locales/{hy-am.cjs → hy-am.esm.js} +1 -5
- package/locales/hy-am.global.js +1 -1
- package/locales/hy-am.global.min.js +1 -1
- package/locales/hy-am.js +5 -1
- package/locales/{id.cjs → id.esm.js} +1 -5
- package/locales/id.global.js +1 -1
- package/locales/id.global.min.js +1 -1
- package/locales/id.js +5 -1
- package/locales/{is.cjs → is.esm.js} +1 -5
- package/locales/is.global.js +1 -1
- package/locales/is.global.min.js +1 -1
- package/locales/is.js +5 -1
- package/locales/{it.cjs → it.esm.js} +1 -5
- package/locales/it.global.js +1 -1
- package/locales/it.global.min.js +1 -1
- package/locales/it.js +5 -1
- package/locales/{ja.cjs → ja.esm.js} +1 -5
- package/locales/ja.global.js +1 -1
- package/locales/ja.global.min.js +1 -1
- package/locales/ja.js +5 -1
- package/locales/{ka.cjs → ka.esm.js} +1 -5
- package/locales/ka.global.js +1 -1
- package/locales/ka.global.min.js +1 -1
- package/locales/ka.js +5 -1
- package/locales/{kk.cjs → kk.esm.js} +1 -5
- package/locales/kk.global.js +1 -1
- package/locales/kk.global.min.js +1 -1
- package/locales/kk.js +5 -1
- package/locales/{km.cjs → km.esm.js} +1 -5
- package/locales/km.global.js +1 -1
- package/locales/km.global.min.js +1 -1
- package/locales/km.js +5 -1
- package/locales/{ko.cjs → ko.esm.js} +1 -5
- package/locales/ko.global.js +1 -1
- package/locales/ko.global.min.js +1 -1
- package/locales/ko.js +5 -1
- package/locales/{ku.cjs → ku.esm.js} +1 -5
- package/locales/ku.global.js +1 -1
- package/locales/ku.global.min.js +1 -1
- package/locales/ku.js +5 -1
- package/locales/{lb.cjs → lb.esm.js} +1 -5
- package/locales/lb.global.js +1 -1
- package/locales/lb.global.min.js +1 -1
- package/locales/lb.js +5 -1
- package/locales/{lt.cjs → lt.esm.js} +1 -5
- package/locales/lt.global.js +1 -1
- package/locales/lt.global.min.js +1 -1
- package/locales/lt.js +5 -1
- package/locales/{lv.cjs → lv.esm.js} +1 -5
- package/locales/lv.global.js +1 -1
- package/locales/lv.global.min.js +1 -1
- package/locales/lv.js +5 -1
- package/locales/{mk.cjs → mk.esm.js} +1 -5
- package/locales/mk.global.js +1 -1
- package/locales/mk.global.min.js +1 -1
- package/locales/mk.js +5 -1
- package/locales/{ms.cjs → ms.esm.js} +1 -5
- package/locales/ms.global.js +1 -1
- package/locales/ms.global.min.js +1 -1
- package/locales/ms.js +5 -1
- package/locales/{nb.cjs → nb.esm.js} +1 -5
- package/locales/nb.global.js +1 -1
- package/locales/nb.global.min.js +1 -1
- package/locales/nb.js +5 -1
- package/locales/{ne.cjs → ne.esm.js} +1 -5
- package/locales/ne.global.js +1 -1
- package/locales/ne.global.min.js +1 -1
- package/locales/ne.js +5 -1
- package/locales/{nl.cjs → nl.esm.js} +1 -5
- package/locales/nl.global.js +1 -1
- package/locales/nl.global.min.js +1 -1
- package/locales/nl.js +5 -1
- package/locales/{nn.cjs → nn.esm.js} +1 -5
- package/locales/nn.global.js +1 -1
- package/locales/nn.global.min.js +1 -1
- package/locales/nn.js +5 -1
- package/locales/{pl.cjs → pl.esm.js} +1 -5
- package/locales/pl.global.js +1 -1
- package/locales/pl.global.min.js +1 -1
- package/locales/pl.js +5 -1
- package/locales/{pt-br.cjs → pt-br.esm.js} +1 -5
- package/locales/pt-br.global.js +1 -1
- package/locales/pt-br.global.min.js +1 -1
- package/locales/pt-br.js +5 -1
- package/locales/{pt.cjs → pt.esm.js} +1 -5
- package/locales/pt.global.js +1 -1
- package/locales/pt.global.min.js +1 -1
- package/locales/pt.js +5 -1
- package/locales/{ro.cjs → ro.esm.js} +1 -5
- package/locales/ro.global.js +1 -1
- package/locales/ro.global.min.js +1 -1
- package/locales/ro.js +5 -1
- package/locales/{ru.cjs → ru.esm.js} +1 -5
- package/locales/ru.global.js +1 -1
- package/locales/ru.global.min.js +1 -1
- package/locales/ru.js +5 -1
- package/locales/{si-lk.cjs → si-lk.esm.js} +1 -5
- package/locales/si-lk.global.js +1 -1
- package/locales/si-lk.global.min.js +1 -1
- package/locales/si-lk.js +5 -1
- package/locales/{sk.cjs → sk.esm.js} +1 -5
- package/locales/sk.global.js +1 -1
- package/locales/sk.global.min.js +1 -1
- package/locales/sk.js +5 -1
- package/locales/{sl.cjs → sl.esm.js} +1 -5
- package/locales/sl.global.js +1 -1
- package/locales/sl.global.min.js +1 -1
- package/locales/sl.js +5 -1
- package/locales/{sm.cjs → sm.esm.js} +1 -5
- package/locales/sm.global.js +1 -1
- package/locales/sm.global.min.js +1 -1
- package/locales/sm.js +5 -1
- package/locales/{sq.cjs → sq.esm.js} +1 -5
- package/locales/sq.global.js +1 -1
- package/locales/sq.global.min.js +1 -1
- package/locales/sq.js +5 -1
- package/locales/{sr-cyrl.cjs → sr-cyrl.esm.js} +1 -5
- package/locales/sr-cyrl.global.js +1 -1
- package/locales/sr-cyrl.global.min.js +1 -1
- package/locales/sr-cyrl.js +5 -1
- package/locales/{sr.cjs → sr.esm.js} +1 -5
- package/locales/sr.global.js +1 -1
- package/locales/sr.global.min.js +1 -1
- package/locales/sr.js +5 -1
- package/locales/{sv.cjs → sv.esm.js} +1 -5
- package/locales/sv.global.js +1 -1
- package/locales/sv.global.min.js +1 -1
- package/locales/sv.js +5 -1
- package/locales/{ta-in.cjs → ta-in.esm.js} +1 -5
- package/locales/ta-in.global.js +1 -1
- package/locales/ta-in.global.min.js +1 -1
- package/locales/ta-in.js +5 -1
- package/locales/{th.cjs → th.esm.js} +1 -5
- package/locales/th.global.js +1 -1
- package/locales/th.global.min.js +1 -1
- package/locales/th.js +5 -1
- package/locales/{tr.cjs → tr.esm.js} +1 -5
- package/locales/tr.global.js +1 -1
- package/locales/tr.global.min.js +1 -1
- package/locales/tr.js +5 -1
- package/locales/{ug.cjs → ug.esm.js} +1 -5
- package/locales/ug.global.js +1 -1
- package/locales/ug.global.min.js +1 -1
- package/locales/ug.js +5 -1
- package/locales/{uk.cjs → uk.esm.js} +1 -5
- package/locales/uk.global.js +1 -1
- package/locales/uk.global.min.js +1 -1
- package/locales/uk.js +5 -1
- package/locales/{uz.cjs → uz.esm.js} +1 -5
- package/locales/uz.global.js +1 -1
- package/locales/uz.global.min.js +1 -1
- package/locales/uz.js +5 -1
- package/locales/{vi.cjs → vi.esm.js} +1 -5
- package/locales/vi.global.js +1 -1
- package/locales/vi.global.min.js +1 -1
- package/locales/vi.js +5 -1
- package/locales/{zh-cn.cjs → zh-cn.esm.js} +1 -5
- package/locales/zh-cn.global.js +1 -1
- package/locales/zh-cn.global.min.js +1 -1
- package/locales/zh-cn.js +5 -1
- package/locales/{zh-tw.cjs → zh-tw.esm.js} +1 -5
- package/locales/zh-tw.global.js +1 -1
- package/locales/zh-tw.global.min.js +1 -1
- package/locales/zh-tw.js +5 -1
- package/locales-all.esm.js +84 -0
- package/locales-all.global.js +1 -1
- package/locales-all.global.min.js +1 -1
- package/locales-all.js +84 -80
- package/package.json +13 -23
- package/preact.esm.js +3 -0
- package/preact.js +22 -3
- package/index.js.map +0 -1
- package/internal-common.js.map +0 -1
- package/internal.cjs +0 -196
- package/internal.js.map +0 -1
- package/locales/af.js.map +0 -1
- package/locales/ar-dz.js.map +0 -1
- package/locales/ar-kw.js.map +0 -1
- package/locales/ar-ly.js.map +0 -1
- package/locales/ar-ma.js.map +0 -1
- package/locales/ar-sa.js.map +0 -1
- package/locales/ar-tn.js.map +0 -1
- package/locales/ar.js.map +0 -1
- package/locales/az.js.map +0 -1
- package/locales/bg.js.map +0 -1
- package/locales/bn.js.map +0 -1
- package/locales/bs.js.map +0 -1
- package/locales/ca.js.map +0 -1
- package/locales/cs.js.map +0 -1
- package/locales/cy.js.map +0 -1
- package/locales/da.js.map +0 -1
- package/locales/de-at.js.map +0 -1
- package/locales/de.js.map +0 -1
- package/locales/el.js.map +0 -1
- package/locales/en-au.js.map +0 -1
- package/locales/en-gb.js.map +0 -1
- package/locales/en-nz.js.map +0 -1
- package/locales/eo.js.map +0 -1
- package/locales/es-us.js.map +0 -1
- package/locales/es.js.map +0 -1
- package/locales/et.js.map +0 -1
- package/locales/eu.js.map +0 -1
- package/locales/fa.js.map +0 -1
- package/locales/fi.js.map +0 -1
- package/locales/fr-ca.js.map +0 -1
- package/locales/fr-ch.js.map +0 -1
- package/locales/fr.js.map +0 -1
- package/locales/gl.js.map +0 -1
- package/locales/he.js.map +0 -1
- package/locales/hi.js.map +0 -1
- package/locales/hr.js.map +0 -1
- package/locales/hu.js.map +0 -1
- package/locales/hy-am.js.map +0 -1
- package/locales/id.js.map +0 -1
- package/locales/is.js.map +0 -1
- package/locales/it.js.map +0 -1
- package/locales/ja.js.map +0 -1
- package/locales/ka.js.map +0 -1
- package/locales/kk.js.map +0 -1
- package/locales/km.js.map +0 -1
- package/locales/ko.js.map +0 -1
- package/locales/ku.js.map +0 -1
- package/locales/lb.js.map +0 -1
- package/locales/lt.js.map +0 -1
- package/locales/lv.js.map +0 -1
- package/locales/mk.js.map +0 -1
- package/locales/ms.js.map +0 -1
- package/locales/nb.js.map +0 -1
- package/locales/ne.js.map +0 -1
- package/locales/nl.js.map +0 -1
- package/locales/nn.js.map +0 -1
- package/locales/pl.js.map +0 -1
- package/locales/pt-br.js.map +0 -1
- package/locales/pt.js.map +0 -1
- package/locales/ro.js.map +0 -1
- package/locales/ru.js.map +0 -1
- package/locales/si-lk.js.map +0 -1
- package/locales/sk.js.map +0 -1
- package/locales/sl.js.map +0 -1
- package/locales/sm.js.map +0 -1
- package/locales/sq.js.map +0 -1
- package/locales/sr-cyrl.js.map +0 -1
- package/locales/sr.js.map +0 -1
- package/locales/sv.js.map +0 -1
- package/locales/ta-in.js.map +0 -1
- package/locales/th.js.map +0 -1
- package/locales/tr.js.map +0 -1
- package/locales/ug.js.map +0 -1
- package/locales/uk.js.map +0 -1
- package/locales/uz.js.map +0 -1
- package/locales/vi.js.map +0 -1
- package/locales/zh-cn.js.map +0 -1
- package/locales/zh-tw.js.map +0 -1
- package/locales-all.cjs +0 -88
- package/locales-all.js.map +0 -1
- package/preact.cjs +0 -22
- package/preact.js.map +0 -1
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var internalCommon = require('./internal-common.cjs');
|
|
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 applyStyleProp, af as sliceEventStore } from './internal-common.esm.js';
|
|
2
|
+
export { ag as JsonRequestError } from './internal-common.esm.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, generator: 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
|
let newInputs = [];
|
|
1038
1035
|
for (let input of inputs) {
|
|
1039
1036
|
let inputFound = false;
|
|
@@ -1060,13 +1057,13 @@ function handleEventSources(inputs, context) {
|
|
|
1060
1057
|
}
|
|
1061
1058
|
|
|
1062
1059
|
function handleDateProfile(dateProfile, context) {
|
|
1063
|
-
context.emitter.trigger('datesSet', Object.assign(Object.assign({},
|
|
1060
|
+
context.emitter.trigger('datesSet', Object.assign(Object.assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi }));
|
|
1064
1061
|
}
|
|
1065
1062
|
|
|
1066
1063
|
function handleEventStore(eventStore, context) {
|
|
1067
1064
|
let { emitter } = context;
|
|
1068
1065
|
if (emitter.hasHandlers('eventsSet')) {
|
|
1069
|
-
emitter.trigger('eventsSet',
|
|
1066
|
+
emitter.trigger('eventsSet', buildEventApis(eventStore, context));
|
|
1070
1067
|
}
|
|
1071
1068
|
}
|
|
1072
1069
|
|
|
@@ -1097,7 +1094,7 @@ class TaskRunner {
|
|
|
1097
1094
|
this.runTaskOption = runTaskOption;
|
|
1098
1095
|
this.drainedOption = drainedOption;
|
|
1099
1096
|
this.queue = [];
|
|
1100
|
-
this.delayedRunner = new
|
|
1097
|
+
this.delayedRunner = new DelayedRunner(this.drain.bind(this));
|
|
1101
1098
|
}
|
|
1102
1099
|
request(task, delay) {
|
|
1103
1100
|
this.queue.push(task);
|
|
@@ -1143,7 +1140,7 @@ function buildTitle(dateProfile, viewOptions, dateEnv) {
|
|
|
1143
1140
|
else { // for day units or smaller, use the actual day range
|
|
1144
1141
|
range = dateProfile.activeRange;
|
|
1145
1142
|
}
|
|
1146
|
-
return dateEnv.formatRange(range.start, range.end,
|
|
1143
|
+
return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {
|
|
1147
1144
|
isEndExclusive: dateProfile.isRangeAllDay,
|
|
1148
1145
|
defaultSeparator: viewOptions.titleRangeSeparator,
|
|
1149
1146
|
});
|
|
@@ -1158,7 +1155,7 @@ function buildTitleFormat(dateProfile) {
|
|
|
1158
1155
|
if (currentRangeUnit === 'month') {
|
|
1159
1156
|
return { year: 'numeric', month: 'long' }; // like "September 2014"
|
|
1160
1157
|
}
|
|
1161
|
-
let days =
|
|
1158
|
+
let days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);
|
|
1162
1159
|
if (days !== null && days > 1) {
|
|
1163
1160
|
// multi-day range. shorter, like "Sep 9 - 10 2014"
|
|
1164
1161
|
return { year: 'numeric', month: 'short', day: 'numeric' };
|
|
@@ -1171,23 +1168,23 @@ function buildTitleFormat(dateProfile) {
|
|
|
1171
1168
|
// also, whatever is happening in constructor, have it happen in action queue too
|
|
1172
1169
|
class CalendarDataManager {
|
|
1173
1170
|
constructor(props) {
|
|
1174
|
-
this.computeOptionsData =
|
|
1175
|
-
this.computeCurrentViewData =
|
|
1176
|
-
this.organizeRawLocales =
|
|
1177
|
-
this.buildLocale =
|
|
1171
|
+
this.computeOptionsData = memoize(this._computeOptionsData);
|
|
1172
|
+
this.computeCurrentViewData = memoize(this._computeCurrentViewData);
|
|
1173
|
+
this.organizeRawLocales = memoize(organizeRawLocales);
|
|
1174
|
+
this.buildLocale = memoize(buildLocale);
|
|
1178
1175
|
this.buildPluginHooks = buildBuildPluginHooks();
|
|
1179
|
-
this.buildDateEnv =
|
|
1180
|
-
this.buildTheme =
|
|
1181
|
-
this.parseToolbars =
|
|
1182
|
-
this.buildViewSpecs =
|
|
1183
|
-
this.buildDateProfileGenerator =
|
|
1184
|
-
this.buildViewApi =
|
|
1185
|
-
this.buildViewUiProps =
|
|
1186
|
-
this.buildEventUiBySource =
|
|
1187
|
-
this.buildEventUiBases =
|
|
1188
|
-
this.parseContextBusinessHours =
|
|
1189
|
-
this.buildTitle =
|
|
1190
|
-
this.emitter = new
|
|
1176
|
+
this.buildDateEnv = memoize(buildDateEnv$1);
|
|
1177
|
+
this.buildTheme = memoize(buildTheme);
|
|
1178
|
+
this.parseToolbars = memoize(parseToolbars);
|
|
1179
|
+
this.buildViewSpecs = memoize(buildViewSpecs);
|
|
1180
|
+
this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);
|
|
1181
|
+
this.buildViewApi = memoize(buildViewApi);
|
|
1182
|
+
this.buildViewUiProps = memoizeObjArg(buildViewUiProps);
|
|
1183
|
+
this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual);
|
|
1184
|
+
this.buildEventUiBases = memoize(buildEventUiBases);
|
|
1185
|
+
this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);
|
|
1186
|
+
this.buildTitle = memoize(buildTitle);
|
|
1187
|
+
this.emitter = new Emitter();
|
|
1191
1188
|
this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this));
|
|
1192
1189
|
this.currentCalendarOptionsInput = {};
|
|
1193
1190
|
this.currentCalendarOptionsRefined = {};
|
|
@@ -1209,9 +1206,9 @@ class CalendarDataManager {
|
|
|
1209
1206
|
props.calendarApi.currentDataManager = this;
|
|
1210
1207
|
this.emitter.setThisContext(props.calendarApi);
|
|
1211
1208
|
this.emitter.setOptions(currentViewData.options);
|
|
1212
|
-
let currentDate =
|
|
1209
|
+
let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);
|
|
1213
1210
|
let dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
|
|
1214
|
-
if (!
|
|
1211
|
+
if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
|
|
1215
1212
|
currentDate = dateProfile.currentRange.start;
|
|
1216
1213
|
}
|
|
1217
1214
|
let calendarContext = {
|
|
@@ -1237,8 +1234,8 @@ class CalendarDataManager {
|
|
|
1237
1234
|
businessHours: this.parseContextBusinessHours(calendarContext),
|
|
1238
1235
|
eventSources,
|
|
1239
1236
|
eventUiBases: {},
|
|
1240
|
-
eventStore:
|
|
1241
|
-
renderableEventStore:
|
|
1237
|
+
eventStore: createEmptyEventStore(),
|
|
1238
|
+
renderableEventStore: createEmptyEventStore(),
|
|
1242
1239
|
dateSelection: null,
|
|
1243
1240
|
eventSelection: '',
|
|
1244
1241
|
eventDrag: null,
|
|
@@ -1288,15 +1285,15 @@ class CalendarDataManager {
|
|
|
1288
1285
|
if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { // hack
|
|
1289
1286
|
dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
|
|
1290
1287
|
}
|
|
1291
|
-
currentDate =
|
|
1288
|
+
currentDate = reduceCurrentDate(currentDate, action);
|
|
1292
1289
|
dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator);
|
|
1293
1290
|
if (action.type === 'PREV' || // TODO: move this logic into DateProfileGenerator
|
|
1294
1291
|
action.type === 'NEXT' || // "
|
|
1295
|
-
!
|
|
1292
|
+
!rangeContainsMarker(dateProfile.currentRange, currentDate)) {
|
|
1296
1293
|
currentDate = dateProfile.currentRange.start;
|
|
1297
1294
|
}
|
|
1298
1295
|
let eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext);
|
|
1299
|
-
let eventStore =
|
|
1296
|
+
let eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext);
|
|
1300
1297
|
let isEventsLoading = computeEventSourcesLoading(eventSources); // BAD. also called in this func in computeIsLoading
|
|
1301
1298
|
let renderableEventStore = (isEventsLoading && !currentViewData.options.progressiveEventRendering) ?
|
|
1302
1299
|
(state.renderableEventStore || eventStore) : // try from previous state
|
|
@@ -1351,7 +1348,7 @@ class CalendarDataManager {
|
|
|
1351
1348
|
if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) {
|
|
1352
1349
|
// hack
|
|
1353
1350
|
state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data);
|
|
1354
|
-
state.eventStore = data.eventStore =
|
|
1351
|
+
state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv);
|
|
1355
1352
|
}
|
|
1356
1353
|
for (let optionName in changeHandlers) {
|
|
1357
1354
|
if (oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) {
|
|
@@ -1384,8 +1381,8 @@ class CalendarDataManager {
|
|
|
1384
1381
|
}
|
|
1385
1382
|
// always called from behind a memoizer
|
|
1386
1383
|
processRawCalendarOptions(optionOverrides, dynamicOptionOverrides) {
|
|
1387
|
-
let { locales, locale } =
|
|
1388
|
-
|
|
1384
|
+
let { locales, locale } = mergeRawOptions([
|
|
1385
|
+
BASE_OPTION_DEFAULTS,
|
|
1389
1386
|
optionOverrides,
|
|
1390
1387
|
dynamicOptionOverrides,
|
|
1391
1388
|
]);
|
|
@@ -1393,10 +1390,10 @@ class CalendarDataManager {
|
|
|
1393
1390
|
let availableRawLocales = availableLocaleData.map;
|
|
1394
1391
|
let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;
|
|
1395
1392
|
let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);
|
|
1396
|
-
let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
1393
|
+
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);
|
|
1397
1394
|
let extra = {};
|
|
1398
|
-
let raw =
|
|
1399
|
-
|
|
1395
|
+
let raw = mergeRawOptions([
|
|
1396
|
+
BASE_OPTION_DEFAULTS,
|
|
1400
1397
|
localeDefaults,
|
|
1401
1398
|
optionOverrides,
|
|
1402
1399
|
dynamicOptionOverrides,
|
|
@@ -1408,9 +1405,9 @@ class CalendarDataManager {
|
|
|
1408
1405
|
for (let optionName in raw) {
|
|
1409
1406
|
if (optionName !== 'plugins') { // because plugins is special-cased
|
|
1410
1407
|
if (raw[optionName] === currentRaw[optionName] ||
|
|
1411
|
-
(
|
|
1408
|
+
(COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1412
1409
|
(optionName in currentRaw) &&
|
|
1413
|
-
|
|
1410
|
+
COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName]))) {
|
|
1414
1411
|
refined[optionName] = currentRefined[optionName];
|
|
1415
1412
|
}
|
|
1416
1413
|
else if (refiners[optionName]) {
|
|
@@ -1467,15 +1464,15 @@ class CalendarDataManager {
|
|
|
1467
1464
|
return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi };
|
|
1468
1465
|
}
|
|
1469
1466
|
processRawViewOptions(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {
|
|
1470
|
-
let raw =
|
|
1471
|
-
|
|
1467
|
+
let raw = mergeRawOptions([
|
|
1468
|
+
BASE_OPTION_DEFAULTS,
|
|
1472
1469
|
viewSpec.optionDefaults,
|
|
1473
1470
|
localeDefaults,
|
|
1474
1471
|
optionOverrides,
|
|
1475
1472
|
viewSpec.optionOverrides,
|
|
1476
1473
|
dynamicOptionOverrides,
|
|
1477
1474
|
]);
|
|
1478
|
-
let refiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
1475
|
+
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);
|
|
1479
1476
|
let refined = {};
|
|
1480
1477
|
let currentRaw = this.currentViewOptionsInput;
|
|
1481
1478
|
let currentRefined = this.currentViewOptionsRefined;
|
|
@@ -1483,14 +1480,14 @@ class CalendarDataManager {
|
|
|
1483
1480
|
let extra = {};
|
|
1484
1481
|
for (let optionName in raw) {
|
|
1485
1482
|
if (raw[optionName] === currentRaw[optionName] ||
|
|
1486
|
-
(
|
|
1487
|
-
|
|
1483
|
+
(COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1484
|
+
COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName]))) {
|
|
1488
1485
|
refined[optionName] = currentRefined[optionName];
|
|
1489
1486
|
}
|
|
1490
1487
|
else {
|
|
1491
1488
|
if (raw[optionName] === this.currentCalendarOptionsInput[optionName] ||
|
|
1492
|
-
(
|
|
1493
|
-
|
|
1489
|
+
(COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1490
|
+
COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], this.currentCalendarOptionsInput[optionName]))) {
|
|
1494
1491
|
if (optionName in this.currentCalendarOptionsRefined) { // might be an "extra" prop
|
|
1495
1492
|
refined[optionName] = this.currentCalendarOptionsRefined[optionName];
|
|
1496
1493
|
}
|
|
@@ -1517,7 +1514,7 @@ class CalendarDataManager {
|
|
|
1517
1514
|
}
|
|
1518
1515
|
function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) {
|
|
1519
1516
|
let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);
|
|
1520
|
-
return new
|
|
1517
|
+
return new DateEnv({
|
|
1521
1518
|
calendarSystem: 'gregory',
|
|
1522
1519
|
timeZone,
|
|
1523
1520
|
namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl,
|
|
@@ -1534,14 +1531,14 @@ function buildTheme(options, pluginHooks) {
|
|
|
1534
1531
|
return new ThemeClass(options);
|
|
1535
1532
|
}
|
|
1536
1533
|
function buildDateProfileGenerator(props) {
|
|
1537
|
-
let DateProfileGeneratorClass = props.dateProfileGeneratorClass ||
|
|
1534
|
+
let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;
|
|
1538
1535
|
return new DateProfileGeneratorClass(props);
|
|
1539
1536
|
}
|
|
1540
1537
|
function buildViewApi(type, getCurrentData, dateEnv) {
|
|
1541
1538
|
return new ViewImpl(type, getCurrentData, dateEnv);
|
|
1542
1539
|
}
|
|
1543
1540
|
function buildEventUiBySource(eventSources) {
|
|
1544
|
-
return
|
|
1541
|
+
return mapHash(eventSources, (eventSource) => eventSource.ui);
|
|
1545
1542
|
}
|
|
1546
1543
|
function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
|
|
1547
1544
|
let eventUiBases = { '': eventUiSingleBase };
|
|
@@ -1556,7 +1553,7 @@ function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
|
|
|
1556
1553
|
function buildViewUiProps(calendarContext) {
|
|
1557
1554
|
let { options } = calendarContext;
|
|
1558
1555
|
return {
|
|
1559
|
-
eventUiSingleBase:
|
|
1556
|
+
eventUiSingleBase: createEventUi({
|
|
1560
1557
|
display: options.eventDisplay,
|
|
1561
1558
|
editable: options.editable,
|
|
1562
1559
|
startEditable: options.eventStartEditable,
|
|
@@ -1570,7 +1567,7 @@ function buildViewUiProps(calendarContext) {
|
|
|
1570
1567
|
color: options.eventColor,
|
|
1571
1568
|
// classNames: options.eventClassNames // render hook will handle this
|
|
1572
1569
|
}, calendarContext),
|
|
1573
|
-
selectionConfig:
|
|
1570
|
+
selectionConfig: createEventUi({
|
|
1574
1571
|
constraint: options.selectConstraint,
|
|
1575
1572
|
overlap: typeof options.selectOverlap === 'boolean' ? options.selectOverlap : undefined,
|
|
1576
1573
|
allow: options.selectAllow,
|
|
@@ -1586,7 +1583,7 @@ function computeIsLoading(state, context) {
|
|
|
1586
1583
|
return false;
|
|
1587
1584
|
}
|
|
1588
1585
|
function parseContextBusinessHours(calendarContext) {
|
|
1589
|
-
return
|
|
1586
|
+
return parseBusinessHours(calendarContext.options.businessHours, calendarContext);
|
|
1590
1587
|
}
|
|
1591
1588
|
function warnUnknownOptions(options, viewName) {
|
|
1592
1589
|
for (let optionName in options) {
|
|
@@ -1595,10 +1592,10 @@ function warnUnknownOptions(options, viewName) {
|
|
|
1595
1592
|
}
|
|
1596
1593
|
}
|
|
1597
1594
|
|
|
1598
|
-
class ToolbarSection extends
|
|
1595
|
+
class ToolbarSection extends BaseComponent {
|
|
1599
1596
|
render() {
|
|
1600
1597
|
let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
|
|
1601
|
-
return
|
|
1598
|
+
return createElement('div', { className: 'fc-toolbar-chunk' }, ...children);
|
|
1602
1599
|
}
|
|
1603
1600
|
renderWidgetGroup(widgetGroup) {
|
|
1604
1601
|
let { props } = this;
|
|
@@ -1609,7 +1606,7 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1609
1606
|
let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
|
|
1610
1607
|
if (buttonName === 'title') {
|
|
1611
1608
|
isOnlyButtons = false;
|
|
1612
|
-
children.push(
|
|
1609
|
+
children.push(createElement("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title));
|
|
1613
1610
|
}
|
|
1614
1611
|
else {
|
|
1615
1612
|
let isPressed = buttonName === props.activeButton;
|
|
@@ -1620,18 +1617,18 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1620
1617
|
if (isPressed) {
|
|
1621
1618
|
buttonClasses.push(theme.getClass('buttonActive'));
|
|
1622
1619
|
}
|
|
1623
|
-
children.push(
|
|
1620
|
+
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 }) : '')));
|
|
1624
1621
|
}
|
|
1625
1622
|
}
|
|
1626
1623
|
if (children.length > 1) {
|
|
1627
1624
|
let groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || '';
|
|
1628
|
-
return
|
|
1625
|
+
return createElement('div', { className: groupClassName }, ...children);
|
|
1629
1626
|
}
|
|
1630
1627
|
return children[0];
|
|
1631
1628
|
}
|
|
1632
1629
|
}
|
|
1633
1630
|
|
|
1634
|
-
class Toolbar extends
|
|
1631
|
+
class Toolbar extends BaseComponent {
|
|
1635
1632
|
render() {
|
|
1636
1633
|
let { model, extraClassName } = this.props;
|
|
1637
1634
|
let forceLtr = false;
|
|
@@ -1658,19 +1655,19 @@ class Toolbar extends internalCommon.BaseComponent {
|
|
|
1658
1655
|
'fc-toolbar',
|
|
1659
1656
|
forceLtr ? 'fc-toolbar-ltr' : '',
|
|
1660
1657
|
];
|
|
1661
|
-
return (
|
|
1658
|
+
return (createElement("div", { className: classNames.join(' ') },
|
|
1662
1659
|
this.renderSection('start', startContent || []),
|
|
1663
1660
|
this.renderSection('center', centerContent || []),
|
|
1664
1661
|
this.renderSection('end', endContent || [])));
|
|
1665
1662
|
}
|
|
1666
1663
|
renderSection(key, widgetGroups) {
|
|
1667
1664
|
let { props } = this;
|
|
1668
|
-
return (
|
|
1665
|
+
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 }));
|
|
1669
1666
|
}
|
|
1670
1667
|
}
|
|
1671
1668
|
|
|
1672
1669
|
// TODO: do function component?
|
|
1673
|
-
class ViewContainer extends
|
|
1670
|
+
class ViewContainer extends BaseComponent {
|
|
1674
1671
|
constructor() {
|
|
1675
1672
|
super(...arguments);
|
|
1676
1673
|
this.state = {
|
|
@@ -1678,7 +1675,7 @@ class ViewContainer extends internalCommon.BaseComponent {
|
|
|
1678
1675
|
};
|
|
1679
1676
|
this.handleEl = (el) => {
|
|
1680
1677
|
this.el = el;
|
|
1681
|
-
|
|
1678
|
+
setRef(this.props.elRef, el);
|
|
1682
1679
|
this.updateAvailableWidth();
|
|
1683
1680
|
};
|
|
1684
1681
|
this.handleResize = () => {
|
|
@@ -1711,7 +1708,7 @@ class ViewContainer extends internalCommon.BaseComponent {
|
|
|
1711
1708
|
else {
|
|
1712
1709
|
height = props.height || '';
|
|
1713
1710
|
}
|
|
1714
|
-
return (
|
|
1711
|
+
return (createElement("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height, paddingBottom } }, props.children));
|
|
1715
1712
|
}
|
|
1716
1713
|
componentDidMount() {
|
|
1717
1714
|
this.context.addResizeHandler(this.handleResize);
|
|
@@ -1731,22 +1728,22 @@ class ViewContainer extends internalCommon.BaseComponent {
|
|
|
1731
1728
|
/*
|
|
1732
1729
|
Detects when the user clicks on an event within a DateComponent
|
|
1733
1730
|
*/
|
|
1734
|
-
class EventClicking extends
|
|
1731
|
+
class EventClicking extends Interaction {
|
|
1735
1732
|
constructor(settings) {
|
|
1736
1733
|
super(settings);
|
|
1737
1734
|
this.handleSegClick = (ev, segEl) => {
|
|
1738
1735
|
let { component } = this;
|
|
1739
1736
|
let { context } = component;
|
|
1740
|
-
let seg =
|
|
1737
|
+
let seg = getElSeg(segEl);
|
|
1741
1738
|
if (seg && // might be the <div> surrounding the more link
|
|
1742
1739
|
component.isValidSegDownEl(ev.target)) {
|
|
1743
1740
|
// our way to simulate a link click for elements that can't be <a> tags
|
|
1744
1741
|
// grab before trigger fired in case trigger trashes DOM thru rerendering
|
|
1745
|
-
let hasUrlContainer =
|
|
1742
|
+
let hasUrlContainer = elementClosest(ev.target, '.fc-event-forced-url');
|
|
1746
1743
|
let url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';
|
|
1747
1744
|
context.emitter.trigger('eventClick', {
|
|
1748
1745
|
el: segEl,
|
|
1749
|
-
event: new
|
|
1746
|
+
event: new EventImpl(component.context, seg.eventRange.def, seg.eventRange.instance),
|
|
1750
1747
|
jsEvent: ev,
|
|
1751
1748
|
view: context.viewApi,
|
|
1752
1749
|
});
|
|
@@ -1755,7 +1752,7 @@ class EventClicking extends internalCommon.Interaction {
|
|
|
1755
1752
|
}
|
|
1756
1753
|
}
|
|
1757
1754
|
};
|
|
1758
|
-
this.destroy =
|
|
1755
|
+
this.destroy = listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events
|
|
1759
1756
|
this.handleSegClick);
|
|
1760
1757
|
}
|
|
1761
1758
|
}
|
|
@@ -1764,7 +1761,7 @@ class EventClicking extends internalCommon.Interaction {
|
|
|
1764
1761
|
Triggers events and adds/removes core classNames when the user's pointer
|
|
1765
1762
|
enters/leaves event-elements of a component.
|
|
1766
1763
|
*/
|
|
1767
|
-
class EventHovering extends
|
|
1764
|
+
class EventHovering extends Interaction {
|
|
1768
1765
|
constructor(settings) {
|
|
1769
1766
|
super(settings);
|
|
1770
1767
|
// for simulating an eventMouseLeave when the event el is destroyed while mouse is over it
|
|
@@ -1774,7 +1771,7 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1774
1771
|
}
|
|
1775
1772
|
};
|
|
1776
1773
|
this.handleSegEnter = (ev, segEl) => {
|
|
1777
|
-
if (
|
|
1774
|
+
if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
|
|
1778
1775
|
this.currentSegEl = segEl;
|
|
1779
1776
|
this.triggerEvent('eventMouseEnter', ev, segEl);
|
|
1780
1777
|
}
|
|
@@ -1785,7 +1782,7 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1785
1782
|
this.triggerEvent('eventMouseLeave', ev, segEl);
|
|
1786
1783
|
}
|
|
1787
1784
|
};
|
|
1788
|
-
this.removeHoverListeners =
|
|
1785
|
+
this.removeHoverListeners = listenToHoverBySelector(settings.el, '.fc-event', // on both fg and bg events
|
|
1789
1786
|
this.handleSegEnter, this.handleSegLeave);
|
|
1790
1787
|
}
|
|
1791
1788
|
destroy() {
|
|
@@ -1794,11 +1791,11 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1794
1791
|
triggerEvent(publicEvName, ev, segEl) {
|
|
1795
1792
|
let { component } = this;
|
|
1796
1793
|
let { context } = component;
|
|
1797
|
-
let seg =
|
|
1794
|
+
let seg = getElSeg(segEl);
|
|
1798
1795
|
if (!ev || component.isValidSegDownEl(ev.target)) {
|
|
1799
1796
|
context.emitter.trigger(publicEvName, {
|
|
1800
1797
|
el: segEl,
|
|
1801
|
-
event: new
|
|
1798
|
+
event: new EventImpl(context, seg.eventRange.def, seg.eventRange.instance),
|
|
1802
1799
|
jsEvent: ev,
|
|
1803
1800
|
view: context.viewApi,
|
|
1804
1801
|
});
|
|
@@ -1806,23 +1803,23 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1806
1803
|
}
|
|
1807
1804
|
}
|
|
1808
1805
|
|
|
1809
|
-
class CalendarContent extends
|
|
1806
|
+
class CalendarContent extends PureComponent {
|
|
1810
1807
|
constructor() {
|
|
1811
1808
|
super(...arguments);
|
|
1812
|
-
this.buildViewContext =
|
|
1813
|
-
this.buildViewPropTransformers =
|
|
1814
|
-
this.buildToolbarProps =
|
|
1815
|
-
this.headerRef =
|
|
1816
|
-
this.footerRef =
|
|
1809
|
+
this.buildViewContext = memoize(buildViewContext);
|
|
1810
|
+
this.buildViewPropTransformers = memoize(buildViewPropTransformers);
|
|
1811
|
+
this.buildToolbarProps = memoize(buildToolbarProps);
|
|
1812
|
+
this.headerRef = createRef();
|
|
1813
|
+
this.footerRef = createRef();
|
|
1817
1814
|
this.interactionsStore = {};
|
|
1818
1815
|
// eslint-disable-next-line
|
|
1819
1816
|
this.state = {
|
|
1820
|
-
viewLabelId:
|
|
1817
|
+
viewLabelId: getUniqueDomId(),
|
|
1821
1818
|
};
|
|
1822
1819
|
// Component Registration
|
|
1823
1820
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1824
1821
|
this.registerInteractiveComponent = (component, settingsInput) => {
|
|
1825
|
-
let settings =
|
|
1822
|
+
let settings = parseInteractionSettings(component, settingsInput);
|
|
1826
1823
|
let DEFAULT_INTERACTIONS = [
|
|
1827
1824
|
EventClicking,
|
|
1828
1825
|
EventHovering,
|
|
@@ -1830,7 +1827,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1830
1827
|
let interactionClasses = DEFAULT_INTERACTIONS.concat(this.props.pluginHooks.componentInteractions);
|
|
1831
1828
|
let interactions = interactionClasses.map((TheInteractionClass) => new TheInteractionClass(settings));
|
|
1832
1829
|
this.interactionsStore[component.uid] = interactions;
|
|
1833
|
-
|
|
1830
|
+
interactionSettingsStore[component.uid] = settings;
|
|
1834
1831
|
};
|
|
1835
1832
|
this.unregisterInteractiveComponent = (component) => {
|
|
1836
1833
|
let listeners = this.interactionsStore[component.uid];
|
|
@@ -1840,11 +1837,11 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1840
1837
|
}
|
|
1841
1838
|
delete this.interactionsStore[component.uid];
|
|
1842
1839
|
}
|
|
1843
|
-
delete
|
|
1840
|
+
delete interactionSettingsStore[component.uid];
|
|
1844
1841
|
};
|
|
1845
1842
|
// Resizing
|
|
1846
1843
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1847
|
-
this.resizeRunner = new
|
|
1844
|
+
this.resizeRunner = new DelayedRunner(() => {
|
|
1848
1845
|
this.props.emitter.trigger('_resize', true); // should window resizes be considered "forced" ?
|
|
1849
1846
|
this.props.emitter.trigger('windowResize', { view: this.props.viewApi });
|
|
1850
1847
|
});
|
|
@@ -1863,7 +1860,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1863
1860
|
render() {
|
|
1864
1861
|
let { props } = this;
|
|
1865
1862
|
let { toolbarConfig, options } = props;
|
|
1866
|
-
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate,
|
|
1863
|
+
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
|
|
1867
1864
|
props.viewTitle);
|
|
1868
1865
|
let viewVGrow = false;
|
|
1869
1866
|
let viewHeight = '';
|
|
@@ -1884,12 +1881,12 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1884
1881
|
let viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)
|
|
1885
1882
|
? this.state.viewLabelId
|
|
1886
1883
|
: '';
|
|
1887
|
-
return (
|
|
1888
|
-
toolbarConfig.header && (
|
|
1889
|
-
|
|
1884
|
+
return (createElement(ViewContextType.Provider, { value: viewContext },
|
|
1885
|
+
toolbarConfig.header && (createElement(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
|
|
1886
|
+
createElement(ViewContainer, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
|
|
1890
1887
|
this.renderView(props),
|
|
1891
1888
|
this.buildAppendContent()),
|
|
1892
|
-
toolbarConfig.footer && (
|
|
1889
|
+
toolbarConfig.footer && (createElement(Toolbar, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
|
|
1893
1890
|
}
|
|
1894
1891
|
componentDidMount() {
|
|
1895
1892
|
let { props } = this;
|
|
@@ -1921,7 +1918,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1921
1918
|
buildAppendContent() {
|
|
1922
1919
|
let { props } = this;
|
|
1923
1920
|
let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
|
|
1924
|
-
return
|
|
1921
|
+
return createElement(Fragment, {}, ...children);
|
|
1925
1922
|
}
|
|
1926
1923
|
renderView(props) {
|
|
1927
1924
|
let { pluginHooks } = props;
|
|
@@ -1943,7 +1940,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1943
1940
|
Object.assign(viewProps, transformer.transform(viewProps, props));
|
|
1944
1941
|
}
|
|
1945
1942
|
let ViewComponent = viewSpec.component;
|
|
1946
|
-
return (
|
|
1943
|
+
return (createElement(ViewComponent, Object.assign({}, viewProps)));
|
|
1947
1944
|
}
|
|
1948
1945
|
}
|
|
1949
1946
|
function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
|
|
@@ -1955,7 +1952,7 @@ function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentD
|
|
|
1955
1952
|
title,
|
|
1956
1953
|
activeButton: viewSpec.type,
|
|
1957
1954
|
navUnit: viewSpec.singleUnit,
|
|
1958
|
-
isTodayEnabled: todayInfo.isValid && !
|
|
1955
|
+
isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
|
|
1959
1956
|
isPrevEnabled: prevInfo.isValid,
|
|
1960
1957
|
isNextEnabled: nextInfo.isValid,
|
|
1961
1958
|
};
|
|
@@ -1966,7 +1963,7 @@ function buildViewPropTransformers(theClasses) {
|
|
|
1966
1963
|
return theClasses.map((TheClass) => new TheClass());
|
|
1967
1964
|
}
|
|
1968
1965
|
|
|
1969
|
-
class Calendar extends
|
|
1966
|
+
class Calendar extends CalendarImpl {
|
|
1970
1967
|
constructor(el, optionOverrides = {}) {
|
|
1971
1968
|
super();
|
|
1972
1969
|
this.isRendering = false;
|
|
@@ -1989,24 +1986,24 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
1989
1986
|
if (this.isRendering) {
|
|
1990
1987
|
this.isRendered = true;
|
|
1991
1988
|
let { currentData } = this;
|
|
1992
|
-
|
|
1993
|
-
|
|
1989
|
+
flushSync(() => {
|
|
1990
|
+
render(createElement(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, isHeightAuto, forPrint) => {
|
|
1994
1991
|
this.setClassNames(classNames);
|
|
1995
1992
|
this.setHeight(height);
|
|
1996
|
-
return (
|
|
1997
|
-
|
|
1993
|
+
return (createElement(RenderId.Provider, { value: this.customContentRenderId },
|
|
1994
|
+
createElement(CalendarContent, Object.assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData))));
|
|
1998
1995
|
}), this.el);
|
|
1999
1996
|
});
|
|
2000
1997
|
}
|
|
2001
1998
|
else if (this.isRendered) {
|
|
2002
1999
|
this.isRendered = false;
|
|
2003
|
-
|
|
2000
|
+
render(null, this.el);
|
|
2004
2001
|
this.setClassNames([]);
|
|
2005
2002
|
this.setHeight('');
|
|
2006
2003
|
}
|
|
2007
2004
|
};
|
|
2008
2005
|
this.el = el;
|
|
2009
|
-
this.renderRunner = new
|
|
2006
|
+
this.renderRunner = new DelayedRunner(this.handleRenderRequest);
|
|
2010
2007
|
new CalendarDataManager({
|
|
2011
2008
|
optionOverrides,
|
|
2012
2009
|
calendarApi: this,
|
|
@@ -2034,7 +2031,7 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2034
2031
|
}
|
|
2035
2032
|
}
|
|
2036
2033
|
updateSize() {
|
|
2037
|
-
|
|
2034
|
+
flushSync(() => {
|
|
2038
2035
|
super.updateSize();
|
|
2039
2036
|
});
|
|
2040
2037
|
}
|
|
@@ -2053,7 +2050,7 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2053
2050
|
this.currentDataManager.resetOptions(optionOverrides, append);
|
|
2054
2051
|
}
|
|
2055
2052
|
setClassNames(classNames) {
|
|
2056
|
-
if (!
|
|
2053
|
+
if (!isArraysEqual(classNames, this.currentClassNames)) {
|
|
2057
2054
|
let { classList } = this.el;
|
|
2058
2055
|
for (let className of this.currentClassNames) {
|
|
2059
2056
|
classList.remove(className);
|
|
@@ -2065,13 +2062,13 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2065
2062
|
}
|
|
2066
2063
|
}
|
|
2067
2064
|
setHeight(height) {
|
|
2068
|
-
|
|
2065
|
+
applyStyleProp(this.el, 'height', height);
|
|
2069
2066
|
}
|
|
2070
2067
|
}
|
|
2071
2068
|
|
|
2072
2069
|
function formatDate(dateInput, options = {}) {
|
|
2073
2070
|
let dateEnv = buildDateEnv(options);
|
|
2074
|
-
let formatter =
|
|
2071
|
+
let formatter = createFormatter(options);
|
|
2075
2072
|
let dateMeta = dateEnv.createMarkerMeta(dateInput);
|
|
2076
2073
|
if (!dateMeta) { // TODO: warning?
|
|
2077
2074
|
return '';
|
|
@@ -2082,7 +2079,7 @@ function formatDate(dateInput, options = {}) {
|
|
|
2082
2079
|
}
|
|
2083
2080
|
function formatRange(startInput, endInput, options) {
|
|
2084
2081
|
let dateEnv = buildDateEnv(typeof options === 'object' && options ? options : {}); // pass in if non-null object
|
|
2085
|
-
let formatter =
|
|
2082
|
+
let formatter = createFormatter(options);
|
|
2086
2083
|
let startMeta = dateEnv.createMarkerMeta(startInput);
|
|
2087
2084
|
let endMeta = dateEnv.createMarkerMeta(endInput);
|
|
2088
2085
|
if (!startMeta || !endMeta) { // TODO: warning?
|
|
@@ -2092,13 +2089,13 @@ function formatRange(startInput, endInput, options) {
|
|
|
2092
2089
|
forcedStartTzo: startMeta.forcedTzo,
|
|
2093
2090
|
forcedEndTzo: endMeta.forcedTzo,
|
|
2094
2091
|
isEndExclusive: options.isEndExclusive,
|
|
2095
|
-
defaultSeparator:
|
|
2092
|
+
defaultSeparator: BASE_OPTION_DEFAULTS.defaultRangeSeparator,
|
|
2096
2093
|
});
|
|
2097
2094
|
}
|
|
2098
2095
|
// TODO: more DRY and optimized
|
|
2099
2096
|
function buildDateEnv(settings) {
|
|
2100
2097
|
let locale = buildLocale(settings.locale || 'en', organizeRawLocales([]).map); // TODO: don't hardcode 'en' everywhere
|
|
2101
|
-
return new
|
|
2098
|
+
return new DateEnv(Object.assign(Object.assign({ timeZone: BASE_OPTION_DEFAULTS.timeZone, calendarSystem: 'gregory' }, settings), { locale }));
|
|
2102
2099
|
}
|
|
2103
2100
|
|
|
2104
2101
|
// HELPERS
|
|
@@ -2107,17 +2104,9 @@ if nextDayThreshold is specified, slicing is done in an all-day fashion.
|
|
|
2107
2104
|
you can get nextDayThreshold from context.nextDayThreshold
|
|
2108
2105
|
*/
|
|
2109
2106
|
function sliceEvents(props, allDay) {
|
|
2110
|
-
return
|
|
2107
|
+
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
2111
2108
|
}
|
|
2112
2109
|
|
|
2113
|
-
const version = '6.0.
|
|
2110
|
+
const version = '6.0.3';
|
|
2114
2111
|
|
|
2115
|
-
|
|
2116
|
-
exports.Calendar = Calendar;
|
|
2117
|
-
exports.createPlugin = createPlugin;
|
|
2118
|
-
exports.formatDate = formatDate;
|
|
2119
|
-
exports.formatRange = formatRange;
|
|
2120
|
-
exports.globalLocales = globalLocales;
|
|
2121
|
-
exports.globalPlugins = globalPlugins;
|
|
2122
|
-
exports.sliceEvents = sliceEvents;
|
|
2123
|
-
exports.version = version;
|
|
2112
|
+
export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
|