@fullcalendar/core 6.0.2 → 6.1.0
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.d.ts +1 -1
- package/{index.cjs → index.esm.js} +199 -185
- package/index.global.js +321 -155
- package/index.global.min.js +2 -2
- package/index.js +210 -174
- package/internal-common.d.ts +48 -26
- package/{internal-common.cjs → internal-common.esm.js} +4777 -4872
- package/internal-common.js +5573 -5195
- package/internal.d.ts +1 -1
- 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} +2 -5
- package/locales/ar-dz.global.js +2 -1
- package/locales/ar-dz.global.min.js +2 -2
- package/locales/ar-dz.js +6 -1
- package/locales/{ar-kw.cjs → ar-kw.esm.js} +2 -5
- package/locales/ar-kw.global.js +2 -1
- package/locales/ar-kw.global.min.js +2 -2
- package/locales/ar-kw.js +6 -1
- package/locales/{ar-ly.cjs → ar-ly.esm.js} +2 -5
- package/locales/ar-ly.global.js +2 -1
- package/locales/ar-ly.global.min.js +2 -2
- package/locales/ar-ly.js +6 -1
- package/locales/{ar-ma.cjs → ar-ma.esm.js} +2 -5
- package/locales/ar-ma.global.js +2 -1
- package/locales/ar-ma.global.min.js +2 -2
- package/locales/ar-ma.js +6 -1
- package/locales/{ar-sa.cjs → ar-sa.esm.js} +2 -5
- package/locales/ar-sa.global.js +2 -1
- package/locales/ar-sa.global.min.js +2 -2
- package/locales/ar-sa.js +6 -1
- package/locales/{ar-tn.cjs → ar-tn.esm.js} +2 -5
- package/locales/ar-tn.global.js +2 -1
- package/locales/ar-tn.global.min.js +2 -2
- package/locales/ar-tn.js +6 -1
- package/locales/{ar.cjs → ar.esm.js} +2 -5
- package/locales/ar.global.js +2 -1
- package/locales/ar.global.min.js +2 -2
- package/locales/ar.js +6 -1
- package/locales/{az.cjs → az.esm.js} +2 -5
- package/locales/az.global.js +2 -1
- package/locales/az.global.min.js +2 -2
- package/locales/az.js +6 -1
- package/locales/{bg.cjs → bg.esm.js} +2 -5
- package/locales/bg.global.js +2 -1
- package/locales/bg.global.min.js +2 -2
- package/locales/bg.js +6 -1
- package/locales/{bn.cjs → bn.esm.js} +2 -5
- package/locales/bn.global.js +2 -1
- package/locales/bn.global.min.js +2 -2
- package/locales/bn.js +6 -1
- package/locales/{bs.cjs → bs.esm.js} +2 -5
- package/locales/bs.global.js +2 -1
- package/locales/bs.global.min.js +2 -2
- package/locales/bs.js +6 -1
- package/locales/{ca.cjs → ca.esm.js} +2 -5
- package/locales/ca.global.js +2 -1
- package/locales/ca.global.min.js +2 -2
- package/locales/ca.js +6 -1
- package/locales/{cs.cjs → cs.esm.js} +2 -5
- package/locales/cs.global.js +2 -1
- package/locales/cs.global.min.js +2 -2
- package/locales/cs.js +6 -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} +2 -5
- package/locales/da.global.js +2 -1
- package/locales/da.global.min.js +2 -2
- package/locales/da.js +6 -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} +2 -5
- package/locales/el.global.js +2 -1
- package/locales/el.global.min.js +2 -2
- package/locales/el.js +6 -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} +2 -5
- package/locales/eo.global.js +2 -1
- package/locales/eo.global.min.js +2 -2
- package/locales/eo.js +6 -1
- package/locales/{es-us.cjs → es-us.esm.js} +2 -5
- package/locales/es-us.global.js +2 -1
- package/locales/es-us.global.min.js +2 -2
- package/locales/es-us.js +6 -1
- package/locales/{es.cjs → es.esm.js} +2 -5
- package/locales/es.global.js +2 -1
- package/locales/es.global.min.js +2 -2
- package/locales/es.js +6 -1
- package/locales/{et.cjs → et.esm.js} +2 -5
- package/locales/et.global.js +2 -1
- package/locales/et.global.min.js +2 -2
- package/locales/et.js +6 -1
- package/locales/{eu.cjs → eu.esm.js} +2 -5
- package/locales/eu.global.js +2 -1
- package/locales/eu.global.min.js +2 -2
- package/locales/eu.js +6 -1
- package/locales/{fa.cjs → fa.esm.js} +2 -5
- package/locales/fa.global.js +2 -1
- package/locales/fa.global.min.js +2 -2
- package/locales/fa.js +6 -1
- package/locales/{fi.cjs → fi.esm.js} +2 -5
- package/locales/fi.global.js +2 -1
- package/locales/fi.global.min.js +2 -2
- package/locales/fi.js +6 -1
- package/locales/{fr-ca.cjs → fr-ca.esm.js} +2 -6
- package/locales/fr-ca.global.js +2 -2
- package/locales/fr-ca.global.min.js +2 -2
- package/locales/fr-ca.js +6 -2
- package/locales/{fr-ch.cjs → fr-ch.esm.js} +2 -6
- package/locales/fr-ch.global.js +2 -2
- package/locales/fr-ch.global.min.js +2 -2
- package/locales/fr-ch.js +6 -2
- package/locales/{fr.cjs → fr.esm.js} +3 -6
- package/locales/fr.global.js +3 -2
- package/locales/fr.global.min.js +2 -2
- package/locales/fr.js +7 -2
- package/locales/gl.esm.js +42 -0
- package/locales/gl.global.js +21 -1
- package/locales/gl.global.min.js +2 -2
- package/locales/gl.js +25 -1
- package/locales/{he.cjs → he.esm.js} +2 -5
- package/locales/he.global.js +2 -1
- package/locales/he.global.min.js +2 -2
- package/locales/he.js +6 -1
- package/locales/{hi.cjs → hi.esm.js} +2 -5
- package/locales/hi.global.js +2 -1
- package/locales/hi.global.min.js +2 -2
- package/locales/hi.js +6 -1
- package/locales/{hr.cjs → hr.esm.js} +2 -5
- package/locales/hr.global.js +2 -1
- package/locales/hr.global.min.js +2 -2
- package/locales/hr.js +6 -1
- package/locales/{hu.cjs → hu.esm.js} +2 -5
- package/locales/hu.global.js +2 -1
- package/locales/hu.global.min.js +2 -2
- package/locales/hu.js +6 -1
- package/locales/{hy-am.cjs → hy-am.esm.js} +2 -5
- package/locales/hy-am.global.js +2 -1
- package/locales/hy-am.global.min.js +2 -2
- package/locales/hy-am.js +6 -1
- package/locales/{id.cjs → id.esm.js} +2 -5
- package/locales/id.global.js +2 -1
- package/locales/id.global.min.js +2 -2
- package/locales/id.js +6 -1
- package/locales/{is.cjs → is.esm.js} +2 -5
- package/locales/is.global.js +2 -1
- package/locales/is.global.min.js +2 -2
- package/locales/is.js +6 -1
- package/locales/{it.cjs → it.esm.js} +2 -5
- package/locales/it.global.js +2 -1
- package/locales/it.global.min.js +2 -2
- package/locales/it.js +6 -1
- package/locales/{ja.cjs → ja.esm.js} +2 -5
- package/locales/ja.global.js +2 -1
- package/locales/ja.global.min.js +2 -2
- package/locales/ja.js +6 -1
- package/locales/{ka.cjs → ka.esm.js} +2 -5
- package/locales/ka.global.js +2 -1
- package/locales/ka.global.min.js +2 -2
- package/locales/ka.js +6 -1
- package/locales/{kk.cjs → kk.esm.js} +2 -5
- package/locales/kk.global.js +2 -1
- package/locales/kk.global.min.js +2 -2
- package/locales/kk.js +6 -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} +2 -5
- package/locales/ko.global.js +2 -1
- package/locales/ko.global.min.js +2 -2
- package/locales/ko.js +6 -1
- package/locales/{ku.cjs → ku.esm.js} +2 -5
- package/locales/ku.global.js +2 -1
- package/locales/ku.global.min.js +2 -2
- package/locales/ku.js +6 -1
- package/locales/{lb.cjs → lb.esm.js} +2 -5
- package/locales/lb.global.js +2 -1
- package/locales/lb.global.min.js +2 -2
- package/locales/lb.js +6 -1
- package/locales/{lt.cjs → lt.esm.js} +2 -5
- package/locales/lt.global.js +2 -1
- package/locales/lt.global.min.js +2 -2
- package/locales/lt.js +6 -1
- package/locales/{lv.cjs → lv.esm.js} +2 -5
- package/locales/lv.global.js +2 -1
- package/locales/lv.global.min.js +2 -2
- package/locales/lv.js +6 -1
- package/locales/{mk.cjs → mk.esm.js} +2 -5
- package/locales/mk.global.js +2 -1
- package/locales/mk.global.min.js +2 -2
- package/locales/mk.js +6 -1
- package/locales/{ms.cjs → ms.esm.js} +2 -5
- package/locales/ms.global.js +2 -1
- package/locales/ms.global.min.js +2 -2
- package/locales/ms.js +6 -1
- package/locales/{nb.cjs → nb.esm.js} +2 -5
- package/locales/nb.global.js +2 -1
- package/locales/nb.global.min.js +2 -2
- package/locales/nb.js +6 -1
- package/locales/{ne.cjs → ne.esm.js} +2 -5
- package/locales/ne.global.js +2 -1
- package/locales/ne.global.min.js +2 -2
- package/locales/ne.js +6 -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} +2 -5
- package/locales/nn.global.js +2 -1
- package/locales/nn.global.min.js +2 -2
- package/locales/nn.js +6 -1
- package/locales/{pl.cjs → pl.esm.js} +2 -5
- package/locales/pl.global.js +2 -1
- package/locales/pl.global.min.js +2 -2
- package/locales/pl.js +6 -1
- package/locales/pt-br.esm.js +42 -0
- package/locales/pt-br.global.js +23 -1
- package/locales/pt-br.global.min.js +2 -2
- package/locales/pt-br.js +27 -1
- package/locales/{pt.cjs → pt.esm.js} +2 -5
- package/locales/pt.global.js +2 -1
- package/locales/pt.global.min.js +2 -2
- package/locales/pt.js +6 -1
- package/locales/{ro.cjs → ro.esm.js} +2 -5
- package/locales/ro.global.js +2 -1
- package/locales/ro.global.min.js +2 -2
- package/locales/ro.js +6 -1
- package/locales/{ru.cjs → ru.esm.js} +2 -5
- package/locales/ru.global.js +2 -1
- package/locales/ru.global.min.js +2 -2
- package/locales/ru.js +6 -1
- package/locales/{si-lk.cjs → si-lk.esm.js} +2 -5
- package/locales/si-lk.global.js +2 -1
- package/locales/si-lk.global.min.js +2 -2
- package/locales/si-lk.js +6 -1
- package/locales/{sk.cjs → sk.esm.js} +2 -5
- package/locales/sk.global.js +2 -1
- package/locales/sk.global.min.js +2 -2
- package/locales/sk.js +6 -1
- package/locales/{sl.cjs → sl.esm.js} +2 -5
- package/locales/sl.global.js +2 -1
- package/locales/sl.global.min.js +2 -2
- package/locales/sl.js +6 -1
- package/locales/{sm.cjs → sm.esm.js} +2 -5
- package/locales/sm.global.js +2 -1
- package/locales/sm.global.min.js +2 -2
- package/locales/sm.js +6 -1
- package/locales/{sq.cjs → sq.esm.js} +3 -6
- package/locales/sq.global.js +3 -2
- package/locales/sq.global.min.js +2 -2
- package/locales/sq.js +7 -2
- package/locales/{sr-cyrl.cjs → sr-cyrl.esm.js} +2 -5
- package/locales/sr-cyrl.global.js +2 -1
- package/locales/sr-cyrl.global.min.js +2 -2
- package/locales/sr-cyrl.js +6 -1
- package/locales/{sr.cjs → sr.esm.js} +2 -5
- package/locales/sr.global.js +2 -1
- package/locales/sr.global.min.js +2 -2
- package/locales/sr.js +6 -1
- package/locales/{sv.cjs → sv.esm.js} +2 -5
- package/locales/sv.global.js +2 -1
- package/locales/sv.global.min.js +2 -2
- package/locales/sv.js +6 -1
- package/locales/{ta-in.cjs → ta-in.esm.js} +2 -5
- package/locales/ta-in.global.js +2 -1
- package/locales/ta-in.global.min.js +2 -2
- package/locales/ta-in.js +6 -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} +2 -5
- package/locales/tr.global.js +2 -1
- package/locales/tr.global.min.js +2 -2
- package/locales/tr.js +6 -1
- package/locales/{ug.cjs → ug.esm.js} +5 -5
- package/locales/ug.global.js +5 -1
- package/locales/ug.global.min.js +2 -2
- package/locales/ug.js +9 -1
- package/locales/{uk.cjs → uk.esm.js} +2 -5
- package/locales/uk.global.js +2 -1
- package/locales/uk.global.min.js +2 -2
- package/locales/uk.js +6 -1
- package/locales/uz-cy.d.ts +6 -0
- package/locales/uz-cy.esm.js +24 -0
- package/locales/uz-cy.global.js +34 -0
- package/locales/uz-cy.global.min.js +6 -0
- package/locales/uz-cy.js +28 -0
- package/locales/{uz.cjs → uz.esm.js} +10 -6
- package/locales/uz.global.js +9 -1
- package/locales/uz.global.min.js +2 -2
- package/locales/uz.js +14 -2
- package/locales/{vi.cjs → vi.esm.js} +3 -6
- package/locales/vi.global.js +2 -1
- package/locales/vi.global.min.js +2 -2
- package/locales/vi.js +7 -2
- package/locales/{zh-cn.cjs → zh-cn.esm.js} +3 -6
- package/locales/zh-cn.global.js +2 -1
- package/locales/zh-cn.global.min.js +2 -2
- package/locales/zh-cn.js +7 -2
- package/locales/{zh-tw.cjs → zh-tw.esm.js} +3 -6
- package/locales/zh-tw.global.js +2 -1
- package/locales/zh-tw.global.min.js +2 -2
- package/locales/zh-tw.js +7 -2
- package/locales-all.esm.js +85 -0
- package/locales-all.global.js +148 -9
- package/locales-all.global.min.js +2 -2
- package/locales-all.js +85 -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.cjs +0 -26
- 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.cjs +0 -24
- 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 ensureElHasStyles, af as applyStyleProp, ag as sliceEventStore } from './internal-common.esm.js';
|
|
2
|
+
export { ah 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, 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,17 @@ 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);
|
|
1034
|
+
if (unfoundSources.length === 1 &&
|
|
1035
|
+
inputs.length === 1 &&
|
|
1036
|
+
Array.isArray(unfoundSources[0]._raw) &&
|
|
1037
|
+
Array.isArray(inputs[0])) {
|
|
1038
|
+
context.dispatch({
|
|
1039
|
+
type: 'RESET_RAW_EVENTS',
|
|
1040
|
+
sourceId: unfoundSources[0].sourceId,
|
|
1041
|
+
rawEvents: inputs[0],
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1037
1044
|
let newInputs = [];
|
|
1038
1045
|
for (let input of inputs) {
|
|
1039
1046
|
let inputFound = false;
|
|
@@ -1060,13 +1067,13 @@ function handleEventSources(inputs, context) {
|
|
|
1060
1067
|
}
|
|
1061
1068
|
|
|
1062
1069
|
function handleDateProfile(dateProfile, context) {
|
|
1063
|
-
context.emitter.trigger('datesSet', Object.assign(Object.assign({},
|
|
1070
|
+
context.emitter.trigger('datesSet', Object.assign(Object.assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi }));
|
|
1064
1071
|
}
|
|
1065
1072
|
|
|
1066
1073
|
function handleEventStore(eventStore, context) {
|
|
1067
1074
|
let { emitter } = context;
|
|
1068
1075
|
if (emitter.hasHandlers('eventsSet')) {
|
|
1069
|
-
emitter.trigger('eventsSet',
|
|
1076
|
+
emitter.trigger('eventsSet', buildEventApis(eventStore, context));
|
|
1070
1077
|
}
|
|
1071
1078
|
}
|
|
1072
1079
|
|
|
@@ -1097,7 +1104,7 @@ class TaskRunner {
|
|
|
1097
1104
|
this.runTaskOption = runTaskOption;
|
|
1098
1105
|
this.drainedOption = drainedOption;
|
|
1099
1106
|
this.queue = [];
|
|
1100
|
-
this.delayedRunner = new
|
|
1107
|
+
this.delayedRunner = new DelayedRunner(this.drain.bind(this));
|
|
1101
1108
|
}
|
|
1102
1109
|
request(task, delay) {
|
|
1103
1110
|
this.queue.push(task);
|
|
@@ -1143,7 +1150,7 @@ function buildTitle(dateProfile, viewOptions, dateEnv) {
|
|
|
1143
1150
|
else { // for day units or smaller, use the actual day range
|
|
1144
1151
|
range = dateProfile.activeRange;
|
|
1145
1152
|
}
|
|
1146
|
-
return dateEnv.formatRange(range.start, range.end,
|
|
1153
|
+
return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {
|
|
1147
1154
|
isEndExclusive: dateProfile.isRangeAllDay,
|
|
1148
1155
|
defaultSeparator: viewOptions.titleRangeSeparator,
|
|
1149
1156
|
});
|
|
@@ -1158,7 +1165,7 @@ function buildTitleFormat(dateProfile) {
|
|
|
1158
1165
|
if (currentRangeUnit === 'month') {
|
|
1159
1166
|
return { year: 'numeric', month: 'long' }; // like "September 2014"
|
|
1160
1167
|
}
|
|
1161
|
-
let days =
|
|
1168
|
+
let days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);
|
|
1162
1169
|
if (days !== null && days > 1) {
|
|
1163
1170
|
// multi-day range. shorter, like "Sep 9 - 10 2014"
|
|
1164
1171
|
return { year: 'numeric', month: 'short', day: 'numeric' };
|
|
@@ -1171,29 +1178,30 @@ function buildTitleFormat(dateProfile) {
|
|
|
1171
1178
|
// also, whatever is happening in constructor, have it happen in action queue too
|
|
1172
1179
|
class CalendarDataManager {
|
|
1173
1180
|
constructor(props) {
|
|
1174
|
-
this.
|
|
1175
|
-
this.
|
|
1176
|
-
this.
|
|
1177
|
-
this.buildLocale = internalCommon.memoize(buildLocale);
|
|
1181
|
+
this.computeCurrentViewData = memoize(this._computeCurrentViewData);
|
|
1182
|
+
this.organizeRawLocales = memoize(organizeRawLocales);
|
|
1183
|
+
this.buildLocale = memoize(buildLocale);
|
|
1178
1184
|
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
|
|
1185
|
+
this.buildDateEnv = memoize(buildDateEnv$1);
|
|
1186
|
+
this.buildTheme = memoize(buildTheme);
|
|
1187
|
+
this.parseToolbars = memoize(parseToolbars);
|
|
1188
|
+
this.buildViewSpecs = memoize(buildViewSpecs);
|
|
1189
|
+
this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);
|
|
1190
|
+
this.buildViewApi = memoize(buildViewApi);
|
|
1191
|
+
this.buildViewUiProps = memoizeObjArg(buildViewUiProps);
|
|
1192
|
+
this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual);
|
|
1193
|
+
this.buildEventUiBases = memoize(buildEventUiBases);
|
|
1194
|
+
this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);
|
|
1195
|
+
this.buildTitle = memoize(buildTitle);
|
|
1196
|
+
this.emitter = new Emitter();
|
|
1191
1197
|
this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this));
|
|
1192
1198
|
this.currentCalendarOptionsInput = {};
|
|
1193
1199
|
this.currentCalendarOptionsRefined = {};
|
|
1194
1200
|
this.currentViewOptionsInput = {};
|
|
1195
1201
|
this.currentViewOptionsRefined = {};
|
|
1196
1202
|
this.currentCalendarOptionsRefiners = {};
|
|
1203
|
+
this.optionsForRefining = [];
|
|
1204
|
+
this.optionsForHandling = [];
|
|
1197
1205
|
this.getCurrentData = () => this.data;
|
|
1198
1206
|
this.dispatch = (action) => {
|
|
1199
1207
|
this.actionRunner.request(action); // protects against recursive calls to _handleAction
|
|
@@ -1209,9 +1217,9 @@ class CalendarDataManager {
|
|
|
1209
1217
|
props.calendarApi.currentDataManager = this;
|
|
1210
1218
|
this.emitter.setThisContext(props.calendarApi);
|
|
1211
1219
|
this.emitter.setOptions(currentViewData.options);
|
|
1212
|
-
let currentDate =
|
|
1220
|
+
let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);
|
|
1213
1221
|
let dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
|
|
1214
|
-
if (!
|
|
1222
|
+
if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
|
|
1215
1223
|
currentDate = dateProfile.currentRange.start;
|
|
1216
1224
|
}
|
|
1217
1225
|
let calendarContext = {
|
|
@@ -1237,8 +1245,8 @@ class CalendarDataManager {
|
|
|
1237
1245
|
businessHours: this.parseContextBusinessHours(calendarContext),
|
|
1238
1246
|
eventSources,
|
|
1239
1247
|
eventUiBases: {},
|
|
1240
|
-
eventStore:
|
|
1241
|
-
renderableEventStore:
|
|
1248
|
+
eventStore: createEmptyEventStore(),
|
|
1249
|
+
renderableEventStore: createEmptyEventStore(),
|
|
1242
1250
|
dateSelection: null,
|
|
1243
1251
|
eventSelection: '',
|
|
1244
1252
|
eventDrag: null,
|
|
@@ -1256,13 +1264,20 @@ class CalendarDataManager {
|
|
|
1256
1264
|
this.updateData();
|
|
1257
1265
|
this.actionRunner.resume();
|
|
1258
1266
|
}
|
|
1259
|
-
resetOptions(optionOverrides,
|
|
1267
|
+
resetOptions(optionOverrides, changedOptionNames) {
|
|
1260
1268
|
let { props } = this;
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1269
|
+
if (changedOptionNames === undefined) {
|
|
1270
|
+
props.optionOverrides = optionOverrides;
|
|
1271
|
+
}
|
|
1272
|
+
else {
|
|
1273
|
+
props.optionOverrides = Object.assign(Object.assign({}, (props.optionOverrides || {})), optionOverrides);
|
|
1274
|
+
this.optionsForRefining.push(...changedOptionNames);
|
|
1275
|
+
}
|
|
1276
|
+
if (changedOptionNames === undefined || changedOptionNames.length) {
|
|
1277
|
+
this.actionRunner.request({
|
|
1278
|
+
type: 'NOTHING',
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1266
1281
|
}
|
|
1267
1282
|
_handleAction(action) {
|
|
1268
1283
|
let { props, state, emitter } = this;
|
|
@@ -1288,15 +1303,15 @@ class CalendarDataManager {
|
|
|
1288
1303
|
if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { // hack
|
|
1289
1304
|
dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
|
|
1290
1305
|
}
|
|
1291
|
-
currentDate =
|
|
1306
|
+
currentDate = reduceCurrentDate(currentDate, action);
|
|
1292
1307
|
dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator);
|
|
1293
1308
|
if (action.type === 'PREV' || // TODO: move this logic into DateProfileGenerator
|
|
1294
1309
|
action.type === 'NEXT' || // "
|
|
1295
|
-
!
|
|
1310
|
+
!rangeContainsMarker(dateProfile.currentRange, currentDate)) {
|
|
1296
1311
|
currentDate = dateProfile.currentRange.start;
|
|
1297
1312
|
}
|
|
1298
1313
|
let eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext);
|
|
1299
|
-
let eventStore =
|
|
1314
|
+
let eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext);
|
|
1300
1315
|
let isEventsLoading = computeEventSourcesLoading(eventSources); // BAD. also called in this func in computeIsLoading
|
|
1301
1316
|
let renderableEventStore = (isEventsLoading && !currentViewData.options.progressiveEventRendering) ?
|
|
1302
1317
|
(state.renderableEventStore || eventStore) : // try from previous state
|
|
@@ -1351,27 +1366,34 @@ class CalendarDataManager {
|
|
|
1351
1366
|
if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) {
|
|
1352
1367
|
// hack
|
|
1353
1368
|
state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data);
|
|
1354
|
-
state.eventStore = data.eventStore =
|
|
1369
|
+
state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv);
|
|
1355
1370
|
}
|
|
1356
1371
|
for (let optionName in changeHandlers) {
|
|
1357
|
-
if (
|
|
1372
|
+
if (this.optionsForHandling.indexOf(optionName) !== -1 ||
|
|
1373
|
+
oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) {
|
|
1358
1374
|
changeHandlers[optionName](newCalendarOptions[optionName], data);
|
|
1359
1375
|
}
|
|
1360
1376
|
}
|
|
1361
1377
|
}
|
|
1378
|
+
this.optionsForHandling = [];
|
|
1362
1379
|
if (props.onData) {
|
|
1363
1380
|
props.onData(data);
|
|
1364
1381
|
}
|
|
1365
1382
|
}
|
|
1366
|
-
|
|
1383
|
+
computeOptionsData(optionOverrides, dynamicOptionOverrides, calendarApi) {
|
|
1367
1384
|
// TODO: blacklist options that are handled by optionChangeHandlers
|
|
1385
|
+
if (!this.optionsForRefining.length &&
|
|
1386
|
+
optionOverrides === this.stableOptionOverrides &&
|
|
1387
|
+
dynamicOptionOverrides === this.stableDynamicOptionOverrides) {
|
|
1388
|
+
return this.stableCalendarOptionsData;
|
|
1389
|
+
}
|
|
1368
1390
|
let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData, extra, } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides);
|
|
1369
1391
|
warnUnknownOptions(extra);
|
|
1370
1392
|
let dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator);
|
|
1371
|
-
let viewSpecs = this.buildViewSpecs(pluginHooks.views,
|
|
1393
|
+
let viewSpecs = this.buildViewSpecs(pluginHooks.views, this.stableOptionOverrides, this.stableDynamicOptionOverrides, localeDefaults);
|
|
1372
1394
|
let theme = this.buildTheme(refinedOptions, pluginHooks);
|
|
1373
|
-
let toolbarConfig = this.parseToolbars(refinedOptions,
|
|
1374
|
-
return {
|
|
1395
|
+
let toolbarConfig = this.parseToolbars(refinedOptions, this.stableOptionOverrides, theme, viewSpecs, calendarApi);
|
|
1396
|
+
return this.stableCalendarOptionsData = {
|
|
1375
1397
|
calendarOptions: refinedOptions,
|
|
1376
1398
|
pluginHooks,
|
|
1377
1399
|
dateEnv,
|
|
@@ -1384,8 +1406,8 @@ class CalendarDataManager {
|
|
|
1384
1406
|
}
|
|
1385
1407
|
// always called from behind a memoizer
|
|
1386
1408
|
processRawCalendarOptions(optionOverrides, dynamicOptionOverrides) {
|
|
1387
|
-
let { locales, locale } =
|
|
1388
|
-
|
|
1409
|
+
let { locales, locale } = mergeRawOptions([
|
|
1410
|
+
BASE_OPTION_DEFAULTS,
|
|
1389
1411
|
optionOverrides,
|
|
1390
1412
|
dynamicOptionOverrides,
|
|
1391
1413
|
]);
|
|
@@ -1393,10 +1415,10 @@ class CalendarDataManager {
|
|
|
1393
1415
|
let availableRawLocales = availableLocaleData.map;
|
|
1394
1416
|
let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;
|
|
1395
1417
|
let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);
|
|
1396
|
-
let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
1418
|
+
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
1419
|
let extra = {};
|
|
1398
|
-
let raw =
|
|
1399
|
-
|
|
1420
|
+
let raw = mergeRawOptions([
|
|
1421
|
+
BASE_OPTION_DEFAULTS,
|
|
1400
1422
|
localeDefaults,
|
|
1401
1423
|
optionOverrides,
|
|
1402
1424
|
dynamicOptionOverrides,
|
|
@@ -1406,26 +1428,27 @@ class CalendarDataManager {
|
|
|
1406
1428
|
let currentRefined = this.currentCalendarOptionsRefined;
|
|
1407
1429
|
let anyChanges = false;
|
|
1408
1430
|
for (let optionName in raw) {
|
|
1409
|
-
if (optionName
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
else {
|
|
1421
|
-
extra[optionName] = currentRaw[optionName];
|
|
1422
|
-
}
|
|
1431
|
+
if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1432
|
+
(optionName in currentRaw) &&
|
|
1433
|
+
COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])))) {
|
|
1434
|
+
refined[optionName] = currentRefined[optionName];
|
|
1435
|
+
}
|
|
1436
|
+
else if (refiners[optionName]) {
|
|
1437
|
+
refined[optionName] = refiners[optionName](raw[optionName]);
|
|
1438
|
+
anyChanges = true;
|
|
1439
|
+
}
|
|
1440
|
+
else {
|
|
1441
|
+
extra[optionName] = currentRaw[optionName];
|
|
1423
1442
|
}
|
|
1424
1443
|
}
|
|
1425
1444
|
if (anyChanges) {
|
|
1426
1445
|
this.currentCalendarOptionsInput = raw;
|
|
1427
1446
|
this.currentCalendarOptionsRefined = refined;
|
|
1447
|
+
this.stableOptionOverrides = optionOverrides;
|
|
1448
|
+
this.stableDynamicOptionOverrides = dynamicOptionOverrides;
|
|
1428
1449
|
}
|
|
1450
|
+
this.optionsForHandling.push(...this.optionsForRefining);
|
|
1451
|
+
this.optionsForRefining = [];
|
|
1429
1452
|
return {
|
|
1430
1453
|
rawOptions: this.currentCalendarOptionsInput,
|
|
1431
1454
|
refinedOptions: this.currentCalendarOptionsRefined,
|
|
@@ -1460,22 +1483,21 @@ class CalendarDataManager {
|
|
|
1460
1483
|
nowInput: refinedOptions.now,
|
|
1461
1484
|
validRangeInput: refinedOptions.validRange,
|
|
1462
1485
|
visibleRangeInput: refinedOptions.visibleRange,
|
|
1463
|
-
monthMode: refinedOptions.monthMode,
|
|
1464
1486
|
fixedWeekCount: refinedOptions.fixedWeekCount,
|
|
1465
1487
|
});
|
|
1466
1488
|
let viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv);
|
|
1467
1489
|
return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi };
|
|
1468
1490
|
}
|
|
1469
1491
|
processRawViewOptions(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {
|
|
1470
|
-
let raw =
|
|
1471
|
-
|
|
1492
|
+
let raw = mergeRawOptions([
|
|
1493
|
+
BASE_OPTION_DEFAULTS,
|
|
1472
1494
|
viewSpec.optionDefaults,
|
|
1473
1495
|
localeDefaults,
|
|
1474
1496
|
optionOverrides,
|
|
1475
1497
|
viewSpec.optionOverrides,
|
|
1476
1498
|
dynamicOptionOverrides,
|
|
1477
1499
|
]);
|
|
1478
|
-
let refiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},
|
|
1500
|
+
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
1501
|
let refined = {};
|
|
1480
1502
|
let currentRaw = this.currentViewOptionsInput;
|
|
1481
1503
|
let currentRefined = this.currentViewOptionsRefined;
|
|
@@ -1483,14 +1505,14 @@ class CalendarDataManager {
|
|
|
1483
1505
|
let extra = {};
|
|
1484
1506
|
for (let optionName in raw) {
|
|
1485
1507
|
if (raw[optionName] === currentRaw[optionName] ||
|
|
1486
|
-
(
|
|
1487
|
-
|
|
1508
|
+
(COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1509
|
+
COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName]))) {
|
|
1488
1510
|
refined[optionName] = currentRefined[optionName];
|
|
1489
1511
|
}
|
|
1490
1512
|
else {
|
|
1491
1513
|
if (raw[optionName] === this.currentCalendarOptionsInput[optionName] ||
|
|
1492
|
-
(
|
|
1493
|
-
|
|
1514
|
+
(COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1515
|
+
COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], this.currentCalendarOptionsInput[optionName]))) {
|
|
1494
1516
|
if (optionName in this.currentCalendarOptionsRefined) { // might be an "extra" prop
|
|
1495
1517
|
refined[optionName] = this.currentCalendarOptionsRefined[optionName];
|
|
1496
1518
|
}
|
|
@@ -1517,7 +1539,7 @@ class CalendarDataManager {
|
|
|
1517
1539
|
}
|
|
1518
1540
|
function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) {
|
|
1519
1541
|
let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);
|
|
1520
|
-
return new
|
|
1542
|
+
return new DateEnv({
|
|
1521
1543
|
calendarSystem: 'gregory',
|
|
1522
1544
|
timeZone,
|
|
1523
1545
|
namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl,
|
|
@@ -1534,14 +1556,14 @@ function buildTheme(options, pluginHooks) {
|
|
|
1534
1556
|
return new ThemeClass(options);
|
|
1535
1557
|
}
|
|
1536
1558
|
function buildDateProfileGenerator(props) {
|
|
1537
|
-
let DateProfileGeneratorClass = props.dateProfileGeneratorClass ||
|
|
1559
|
+
let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;
|
|
1538
1560
|
return new DateProfileGeneratorClass(props);
|
|
1539
1561
|
}
|
|
1540
1562
|
function buildViewApi(type, getCurrentData, dateEnv) {
|
|
1541
1563
|
return new ViewImpl(type, getCurrentData, dateEnv);
|
|
1542
1564
|
}
|
|
1543
1565
|
function buildEventUiBySource(eventSources) {
|
|
1544
|
-
return
|
|
1566
|
+
return mapHash(eventSources, (eventSource) => eventSource.ui);
|
|
1545
1567
|
}
|
|
1546
1568
|
function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
|
|
1547
1569
|
let eventUiBases = { '': eventUiSingleBase };
|
|
@@ -1556,7 +1578,7 @@ function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
|
|
|
1556
1578
|
function buildViewUiProps(calendarContext) {
|
|
1557
1579
|
let { options } = calendarContext;
|
|
1558
1580
|
return {
|
|
1559
|
-
eventUiSingleBase:
|
|
1581
|
+
eventUiSingleBase: createEventUi({
|
|
1560
1582
|
display: options.eventDisplay,
|
|
1561
1583
|
editable: options.editable,
|
|
1562
1584
|
startEditable: options.eventStartEditable,
|
|
@@ -1570,7 +1592,7 @@ function buildViewUiProps(calendarContext) {
|
|
|
1570
1592
|
color: options.eventColor,
|
|
1571
1593
|
// classNames: options.eventClassNames // render hook will handle this
|
|
1572
1594
|
}, calendarContext),
|
|
1573
|
-
selectionConfig:
|
|
1595
|
+
selectionConfig: createEventUi({
|
|
1574
1596
|
constraint: options.selectConstraint,
|
|
1575
1597
|
overlap: typeof options.selectOverlap === 'boolean' ? options.selectOverlap : undefined,
|
|
1576
1598
|
allow: options.selectAllow,
|
|
@@ -1586,7 +1608,7 @@ function computeIsLoading(state, context) {
|
|
|
1586
1608
|
return false;
|
|
1587
1609
|
}
|
|
1588
1610
|
function parseContextBusinessHours(calendarContext) {
|
|
1589
|
-
return
|
|
1611
|
+
return parseBusinessHours(calendarContext.options.businessHours, calendarContext);
|
|
1590
1612
|
}
|
|
1591
1613
|
function warnUnknownOptions(options, viewName) {
|
|
1592
1614
|
for (let optionName in options) {
|
|
@@ -1595,10 +1617,10 @@ function warnUnknownOptions(options, viewName) {
|
|
|
1595
1617
|
}
|
|
1596
1618
|
}
|
|
1597
1619
|
|
|
1598
|
-
class ToolbarSection extends
|
|
1620
|
+
class ToolbarSection extends BaseComponent {
|
|
1599
1621
|
render() {
|
|
1600
1622
|
let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
|
|
1601
|
-
return
|
|
1623
|
+
return createElement('div', { className: 'fc-toolbar-chunk' }, ...children);
|
|
1602
1624
|
}
|
|
1603
1625
|
renderWidgetGroup(widgetGroup) {
|
|
1604
1626
|
let { props } = this;
|
|
@@ -1609,7 +1631,7 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1609
1631
|
let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
|
|
1610
1632
|
if (buttonName === 'title') {
|
|
1611
1633
|
isOnlyButtons = false;
|
|
1612
|
-
children.push(
|
|
1634
|
+
children.push(createElement("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title));
|
|
1613
1635
|
}
|
|
1614
1636
|
else {
|
|
1615
1637
|
let isPressed = buttonName === props.activeButton;
|
|
@@ -1620,18 +1642,18 @@ class ToolbarSection extends internalCommon.BaseComponent {
|
|
|
1620
1642
|
if (isPressed) {
|
|
1621
1643
|
buttonClasses.push(theme.getClass('buttonActive'));
|
|
1622
1644
|
}
|
|
1623
|
-
children.push(
|
|
1645
|
+
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
1646
|
}
|
|
1625
1647
|
}
|
|
1626
1648
|
if (children.length > 1) {
|
|
1627
1649
|
let groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || '';
|
|
1628
|
-
return
|
|
1650
|
+
return createElement('div', { className: groupClassName }, ...children);
|
|
1629
1651
|
}
|
|
1630
1652
|
return children[0];
|
|
1631
1653
|
}
|
|
1632
1654
|
}
|
|
1633
1655
|
|
|
1634
|
-
class Toolbar extends
|
|
1656
|
+
class Toolbar extends BaseComponent {
|
|
1635
1657
|
render() {
|
|
1636
1658
|
let { model, extraClassName } = this.props;
|
|
1637
1659
|
let forceLtr = false;
|
|
@@ -1658,19 +1680,18 @@ class Toolbar extends internalCommon.BaseComponent {
|
|
|
1658
1680
|
'fc-toolbar',
|
|
1659
1681
|
forceLtr ? 'fc-toolbar-ltr' : '',
|
|
1660
1682
|
];
|
|
1661
|
-
return (
|
|
1683
|
+
return (createElement("div", { className: classNames.join(' ') },
|
|
1662
1684
|
this.renderSection('start', startContent || []),
|
|
1663
1685
|
this.renderSection('center', centerContent || []),
|
|
1664
1686
|
this.renderSection('end', endContent || [])));
|
|
1665
1687
|
}
|
|
1666
1688
|
renderSection(key, widgetGroups) {
|
|
1667
1689
|
let { props } = this;
|
|
1668
|
-
return (
|
|
1690
|
+
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
1691
|
}
|
|
1670
1692
|
}
|
|
1671
1693
|
|
|
1672
|
-
|
|
1673
|
-
class ViewContainer extends internalCommon.BaseComponent {
|
|
1694
|
+
class ViewHarness extends BaseComponent {
|
|
1674
1695
|
constructor() {
|
|
1675
1696
|
super(...arguments);
|
|
1676
1697
|
this.state = {
|
|
@@ -1678,7 +1699,7 @@ class ViewContainer extends internalCommon.BaseComponent {
|
|
|
1678
1699
|
};
|
|
1679
1700
|
this.handleEl = (el) => {
|
|
1680
1701
|
this.el = el;
|
|
1681
|
-
|
|
1702
|
+
setRef(this.props.elRef, el);
|
|
1682
1703
|
this.updateAvailableWidth();
|
|
1683
1704
|
};
|
|
1684
1705
|
this.handleResize = () => {
|
|
@@ -1711,7 +1732,7 @@ class ViewContainer extends internalCommon.BaseComponent {
|
|
|
1711
1732
|
else {
|
|
1712
1733
|
height = props.height || '';
|
|
1713
1734
|
}
|
|
1714
|
-
return (
|
|
1735
|
+
return (createElement("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(' '), style: { height, paddingBottom } }, props.children));
|
|
1715
1736
|
}
|
|
1716
1737
|
componentDidMount() {
|
|
1717
1738
|
this.context.addResizeHandler(this.handleResize);
|
|
@@ -1731,22 +1752,22 @@ class ViewContainer extends internalCommon.BaseComponent {
|
|
|
1731
1752
|
/*
|
|
1732
1753
|
Detects when the user clicks on an event within a DateComponent
|
|
1733
1754
|
*/
|
|
1734
|
-
class EventClicking extends
|
|
1755
|
+
class EventClicking extends Interaction {
|
|
1735
1756
|
constructor(settings) {
|
|
1736
1757
|
super(settings);
|
|
1737
1758
|
this.handleSegClick = (ev, segEl) => {
|
|
1738
1759
|
let { component } = this;
|
|
1739
1760
|
let { context } = component;
|
|
1740
|
-
let seg =
|
|
1761
|
+
let seg = getElSeg(segEl);
|
|
1741
1762
|
if (seg && // might be the <div> surrounding the more link
|
|
1742
1763
|
component.isValidSegDownEl(ev.target)) {
|
|
1743
1764
|
// our way to simulate a link click for elements that can't be <a> tags
|
|
1744
1765
|
// grab before trigger fired in case trigger trashes DOM thru rerendering
|
|
1745
|
-
let hasUrlContainer =
|
|
1766
|
+
let hasUrlContainer = elementClosest(ev.target, '.fc-event-forced-url');
|
|
1746
1767
|
let url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';
|
|
1747
1768
|
context.emitter.trigger('eventClick', {
|
|
1748
1769
|
el: segEl,
|
|
1749
|
-
event: new
|
|
1770
|
+
event: new EventImpl(component.context, seg.eventRange.def, seg.eventRange.instance),
|
|
1750
1771
|
jsEvent: ev,
|
|
1751
1772
|
view: context.viewApi,
|
|
1752
1773
|
});
|
|
@@ -1755,7 +1776,7 @@ class EventClicking extends internalCommon.Interaction {
|
|
|
1755
1776
|
}
|
|
1756
1777
|
}
|
|
1757
1778
|
};
|
|
1758
|
-
this.destroy =
|
|
1779
|
+
this.destroy = listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events
|
|
1759
1780
|
this.handleSegClick);
|
|
1760
1781
|
}
|
|
1761
1782
|
}
|
|
@@ -1764,7 +1785,7 @@ class EventClicking extends internalCommon.Interaction {
|
|
|
1764
1785
|
Triggers events and adds/removes core classNames when the user's pointer
|
|
1765
1786
|
enters/leaves event-elements of a component.
|
|
1766
1787
|
*/
|
|
1767
|
-
class EventHovering extends
|
|
1788
|
+
class EventHovering extends Interaction {
|
|
1768
1789
|
constructor(settings) {
|
|
1769
1790
|
super(settings);
|
|
1770
1791
|
// for simulating an eventMouseLeave when the event el is destroyed while mouse is over it
|
|
@@ -1774,7 +1795,7 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1774
1795
|
}
|
|
1775
1796
|
};
|
|
1776
1797
|
this.handleSegEnter = (ev, segEl) => {
|
|
1777
|
-
if (
|
|
1798
|
+
if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
|
|
1778
1799
|
this.currentSegEl = segEl;
|
|
1779
1800
|
this.triggerEvent('eventMouseEnter', ev, segEl);
|
|
1780
1801
|
}
|
|
@@ -1785,7 +1806,7 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1785
1806
|
this.triggerEvent('eventMouseLeave', ev, segEl);
|
|
1786
1807
|
}
|
|
1787
1808
|
};
|
|
1788
|
-
this.removeHoverListeners =
|
|
1809
|
+
this.removeHoverListeners = listenToHoverBySelector(settings.el, '.fc-event', // on both fg and bg events
|
|
1789
1810
|
this.handleSegEnter, this.handleSegLeave);
|
|
1790
1811
|
}
|
|
1791
1812
|
destroy() {
|
|
@@ -1794,11 +1815,11 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1794
1815
|
triggerEvent(publicEvName, ev, segEl) {
|
|
1795
1816
|
let { component } = this;
|
|
1796
1817
|
let { context } = component;
|
|
1797
|
-
let seg =
|
|
1818
|
+
let seg = getElSeg(segEl);
|
|
1798
1819
|
if (!ev || component.isValidSegDownEl(ev.target)) {
|
|
1799
1820
|
context.emitter.trigger(publicEvName, {
|
|
1800
1821
|
el: segEl,
|
|
1801
|
-
event: new
|
|
1822
|
+
event: new EventImpl(context, seg.eventRange.def, seg.eventRange.instance),
|
|
1802
1823
|
jsEvent: ev,
|
|
1803
1824
|
view: context.viewApi,
|
|
1804
1825
|
});
|
|
@@ -1806,23 +1827,23 @@ class EventHovering extends internalCommon.Interaction {
|
|
|
1806
1827
|
}
|
|
1807
1828
|
}
|
|
1808
1829
|
|
|
1809
|
-
class CalendarContent extends
|
|
1830
|
+
class CalendarContent extends PureComponent {
|
|
1810
1831
|
constructor() {
|
|
1811
1832
|
super(...arguments);
|
|
1812
|
-
this.buildViewContext =
|
|
1813
|
-
this.buildViewPropTransformers =
|
|
1814
|
-
this.buildToolbarProps =
|
|
1815
|
-
this.headerRef =
|
|
1816
|
-
this.footerRef =
|
|
1833
|
+
this.buildViewContext = memoize(buildViewContext);
|
|
1834
|
+
this.buildViewPropTransformers = memoize(buildViewPropTransformers);
|
|
1835
|
+
this.buildToolbarProps = memoize(buildToolbarProps);
|
|
1836
|
+
this.headerRef = createRef();
|
|
1837
|
+
this.footerRef = createRef();
|
|
1817
1838
|
this.interactionsStore = {};
|
|
1818
1839
|
// eslint-disable-next-line
|
|
1819
1840
|
this.state = {
|
|
1820
|
-
viewLabelId:
|
|
1841
|
+
viewLabelId: getUniqueDomId(),
|
|
1821
1842
|
};
|
|
1822
1843
|
// Component Registration
|
|
1823
1844
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1824
1845
|
this.registerInteractiveComponent = (component, settingsInput) => {
|
|
1825
|
-
let settings =
|
|
1846
|
+
let settings = parseInteractionSettings(component, settingsInput);
|
|
1826
1847
|
let DEFAULT_INTERACTIONS = [
|
|
1827
1848
|
EventClicking,
|
|
1828
1849
|
EventHovering,
|
|
@@ -1830,7 +1851,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1830
1851
|
let interactionClasses = DEFAULT_INTERACTIONS.concat(this.props.pluginHooks.componentInteractions);
|
|
1831
1852
|
let interactions = interactionClasses.map((TheInteractionClass) => new TheInteractionClass(settings));
|
|
1832
1853
|
this.interactionsStore[component.uid] = interactions;
|
|
1833
|
-
|
|
1854
|
+
interactionSettingsStore[component.uid] = settings;
|
|
1834
1855
|
};
|
|
1835
1856
|
this.unregisterInteractiveComponent = (component) => {
|
|
1836
1857
|
let listeners = this.interactionsStore[component.uid];
|
|
@@ -1840,11 +1861,11 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1840
1861
|
}
|
|
1841
1862
|
delete this.interactionsStore[component.uid];
|
|
1842
1863
|
}
|
|
1843
|
-
delete
|
|
1864
|
+
delete interactionSettingsStore[component.uid];
|
|
1844
1865
|
};
|
|
1845
1866
|
// Resizing
|
|
1846
1867
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1847
|
-
this.resizeRunner = new
|
|
1868
|
+
this.resizeRunner = new DelayedRunner(() => {
|
|
1848
1869
|
this.props.emitter.trigger('_resize', true); // should window resizes be considered "forced" ?
|
|
1849
1870
|
this.props.emitter.trigger('windowResize', { view: this.props.viewApi });
|
|
1850
1871
|
});
|
|
@@ -1863,7 +1884,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1863
1884
|
render() {
|
|
1864
1885
|
let { props } = this;
|
|
1865
1886
|
let { toolbarConfig, options } = props;
|
|
1866
|
-
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate,
|
|
1887
|
+
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
|
|
1867
1888
|
props.viewTitle);
|
|
1868
1889
|
let viewVGrow = false;
|
|
1869
1890
|
let viewHeight = '';
|
|
@@ -1884,12 +1905,12 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1884
1905
|
let viewLabelId = (toolbarConfig.header && toolbarConfig.header.hasTitle)
|
|
1885
1906
|
? this.state.viewLabelId
|
|
1886
1907
|
: '';
|
|
1887
|
-
return (
|
|
1888
|
-
toolbarConfig.header && (
|
|
1889
|
-
|
|
1908
|
+
return (createElement(ViewContextType.Provider, { value: viewContext },
|
|
1909
|
+
toolbarConfig.header && (createElement(Toolbar, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps))),
|
|
1910
|
+
createElement(ViewHarness, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId },
|
|
1890
1911
|
this.renderView(props),
|
|
1891
1912
|
this.buildAppendContent()),
|
|
1892
|
-
toolbarConfig.footer && (
|
|
1913
|
+
toolbarConfig.footer && (createElement(Toolbar, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps)))));
|
|
1893
1914
|
}
|
|
1894
1915
|
componentDidMount() {
|
|
1895
1916
|
let { props } = this;
|
|
@@ -1921,7 +1942,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1921
1942
|
buildAppendContent() {
|
|
1922
1943
|
let { props } = this;
|
|
1923
1944
|
let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
|
|
1924
|
-
return
|
|
1945
|
+
return createElement(Fragment, {}, ...children);
|
|
1925
1946
|
}
|
|
1926
1947
|
renderView(props) {
|
|
1927
1948
|
let { pluginHooks } = props;
|
|
@@ -1943,7 +1964,7 @@ class CalendarContent extends internalCommon.PureComponent {
|
|
|
1943
1964
|
Object.assign(viewProps, transformer.transform(viewProps, props));
|
|
1944
1965
|
}
|
|
1945
1966
|
let ViewComponent = viewSpec.component;
|
|
1946
|
-
return (
|
|
1967
|
+
return (createElement(ViewComponent, Object.assign({}, viewProps)));
|
|
1947
1968
|
}
|
|
1948
1969
|
}
|
|
1949
1970
|
function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
|
|
@@ -1955,7 +1976,7 @@ function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentD
|
|
|
1955
1976
|
title,
|
|
1956
1977
|
activeButton: viewSpec.type,
|
|
1957
1978
|
navUnit: viewSpec.singleUnit,
|
|
1958
|
-
isTodayEnabled: todayInfo.isValid && !
|
|
1979
|
+
isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
|
|
1959
1980
|
isPrevEnabled: prevInfo.isValid,
|
|
1960
1981
|
isNextEnabled: nextInfo.isValid,
|
|
1961
1982
|
};
|
|
@@ -1966,7 +1987,7 @@ function buildViewPropTransformers(theClasses) {
|
|
|
1966
1987
|
return theClasses.map((TheClass) => new TheClass());
|
|
1967
1988
|
}
|
|
1968
1989
|
|
|
1969
|
-
class Calendar extends
|
|
1990
|
+
class Calendar extends CalendarImpl {
|
|
1970
1991
|
constructor(el, optionOverrides = {}) {
|
|
1971
1992
|
super();
|
|
1972
1993
|
this.isRendering = false;
|
|
@@ -1989,24 +2010,25 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
1989
2010
|
if (this.isRendering) {
|
|
1990
2011
|
this.isRendered = true;
|
|
1991
2012
|
let { currentData } = this;
|
|
1992
|
-
|
|
1993
|
-
|
|
2013
|
+
flushSync(() => {
|
|
2014
|
+
render(createElement(CalendarRoot, { options: currentData.calendarOptions, theme: currentData.theme, emitter: currentData.emitter }, (classNames, height, isHeightAuto, forPrint) => {
|
|
1994
2015
|
this.setClassNames(classNames);
|
|
1995
2016
|
this.setHeight(height);
|
|
1996
|
-
return (
|
|
1997
|
-
|
|
2017
|
+
return (createElement(RenderId.Provider, { value: this.customContentRenderId },
|
|
2018
|
+
createElement(CalendarContent, Object.assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData))));
|
|
1998
2019
|
}), this.el);
|
|
1999
2020
|
});
|
|
2000
2021
|
}
|
|
2001
2022
|
else if (this.isRendered) {
|
|
2002
2023
|
this.isRendered = false;
|
|
2003
|
-
|
|
2024
|
+
render(null, this.el);
|
|
2004
2025
|
this.setClassNames([]);
|
|
2005
2026
|
this.setHeight('');
|
|
2006
2027
|
}
|
|
2007
2028
|
};
|
|
2029
|
+
ensureElHasStyles(el);
|
|
2008
2030
|
this.el = el;
|
|
2009
|
-
this.renderRunner = new
|
|
2031
|
+
this.renderRunner = new DelayedRunner(this.handleRenderRequest);
|
|
2010
2032
|
new CalendarDataManager({
|
|
2011
2033
|
optionOverrides,
|
|
2012
2034
|
calendarApi: this,
|
|
@@ -2034,7 +2056,7 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2034
2056
|
}
|
|
2035
2057
|
}
|
|
2036
2058
|
updateSize() {
|
|
2037
|
-
|
|
2059
|
+
flushSync(() => {
|
|
2038
2060
|
super.updateSize();
|
|
2039
2061
|
});
|
|
2040
2062
|
}
|
|
@@ -2049,11 +2071,11 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2049
2071
|
resumeRendering() {
|
|
2050
2072
|
this.renderRunner.resume('pauseRendering', true);
|
|
2051
2073
|
}
|
|
2052
|
-
resetOptions(optionOverrides,
|
|
2053
|
-
this.currentDataManager.resetOptions(optionOverrides,
|
|
2074
|
+
resetOptions(optionOverrides, changedOptionNames) {
|
|
2075
|
+
this.currentDataManager.resetOptions(optionOverrides, changedOptionNames);
|
|
2054
2076
|
}
|
|
2055
2077
|
setClassNames(classNames) {
|
|
2056
|
-
if (!
|
|
2078
|
+
if (!isArraysEqual(classNames, this.currentClassNames)) {
|
|
2057
2079
|
let { classList } = this.el;
|
|
2058
2080
|
for (let className of this.currentClassNames) {
|
|
2059
2081
|
classList.remove(className);
|
|
@@ -2065,13 +2087,13 @@ class Calendar extends internalCommon.CalendarImpl {
|
|
|
2065
2087
|
}
|
|
2066
2088
|
}
|
|
2067
2089
|
setHeight(height) {
|
|
2068
|
-
|
|
2090
|
+
applyStyleProp(this.el, 'height', height);
|
|
2069
2091
|
}
|
|
2070
2092
|
}
|
|
2071
2093
|
|
|
2072
2094
|
function formatDate(dateInput, options = {}) {
|
|
2073
2095
|
let dateEnv = buildDateEnv(options);
|
|
2074
|
-
let formatter =
|
|
2096
|
+
let formatter = createFormatter(options);
|
|
2075
2097
|
let dateMeta = dateEnv.createMarkerMeta(dateInput);
|
|
2076
2098
|
if (!dateMeta) { // TODO: warning?
|
|
2077
2099
|
return '';
|
|
@@ -2082,7 +2104,7 @@ function formatDate(dateInput, options = {}) {
|
|
|
2082
2104
|
}
|
|
2083
2105
|
function formatRange(startInput, endInput, options) {
|
|
2084
2106
|
let dateEnv = buildDateEnv(typeof options === 'object' && options ? options : {}); // pass in if non-null object
|
|
2085
|
-
let formatter =
|
|
2107
|
+
let formatter = createFormatter(options);
|
|
2086
2108
|
let startMeta = dateEnv.createMarkerMeta(startInput);
|
|
2087
2109
|
let endMeta = dateEnv.createMarkerMeta(endInput);
|
|
2088
2110
|
if (!startMeta || !endMeta) { // TODO: warning?
|
|
@@ -2092,13 +2114,13 @@ function formatRange(startInput, endInput, options) {
|
|
|
2092
2114
|
forcedStartTzo: startMeta.forcedTzo,
|
|
2093
2115
|
forcedEndTzo: endMeta.forcedTzo,
|
|
2094
2116
|
isEndExclusive: options.isEndExclusive,
|
|
2095
|
-
defaultSeparator:
|
|
2117
|
+
defaultSeparator: BASE_OPTION_DEFAULTS.defaultRangeSeparator,
|
|
2096
2118
|
});
|
|
2097
2119
|
}
|
|
2098
2120
|
// TODO: more DRY and optimized
|
|
2099
2121
|
function buildDateEnv(settings) {
|
|
2100
2122
|
let locale = buildLocale(settings.locale || 'en', organizeRawLocales([]).map); // TODO: don't hardcode 'en' everywhere
|
|
2101
|
-
return new
|
|
2123
|
+
return new DateEnv(Object.assign(Object.assign({ timeZone: BASE_OPTION_DEFAULTS.timeZone, calendarSystem: 'gregory' }, settings), { locale }));
|
|
2102
2124
|
}
|
|
2103
2125
|
|
|
2104
2126
|
// HELPERS
|
|
@@ -2107,17 +2129,9 @@ if nextDayThreshold is specified, slicing is done in an all-day fashion.
|
|
|
2107
2129
|
you can get nextDayThreshold from context.nextDayThreshold
|
|
2108
2130
|
*/
|
|
2109
2131
|
function sliceEvents(props, allDay) {
|
|
2110
|
-
return
|
|
2132
|
+
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
2111
2133
|
}
|
|
2112
2134
|
|
|
2113
|
-
const version = '6.0
|
|
2135
|
+
const version = '6.1.0';
|
|
2114
2136
|
|
|
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;
|
|
2137
|
+
export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
|