@fullcalendar/core 7.0.0-beta.4 → 7.0.0-beta.6
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/LICENSE.md +1 -1
- package/README.md +7 -1
- package/{index.cjs → cjs/index.cjs} +491 -365
- package/cjs/internal-classnames.cjs +11 -0
- package/{internal-common.cjs → cjs/internal-common.cjs} +5466 -5268
- package/{internal.cjs → cjs/internal.cjs} +25 -19
- package/{locales → cjs/locales}/af.cjs +8 -10
- package/{locales → cjs/locales}/ar-dz.cjs +7 -10
- package/{locales → cjs/locales}/ar-kw.cjs +7 -10
- package/{locales → cjs/locales}/ar-ly.cjs +7 -10
- package/{locales → cjs/locales}/ar-ma.cjs +7 -10
- package/{locales → cjs/locales}/ar-sa.cjs +7 -10
- package/{locales → cjs/locales}/ar-tn.cjs +7 -10
- package/{locales → cjs/locales}/ar.cjs +7 -10
- package/{locales → cjs/locales}/az.cjs +8 -11
- package/{locales → cjs/locales}/bg.cjs +8 -10
- package/{locales → cjs/locales}/bn.cjs +7 -10
- package/{locales → cjs/locales}/bs.cjs +10 -12
- package/{locales → cjs/locales}/ca.cjs +10 -12
- package/{locales → cjs/locales}/cs.cjs +9 -11
- package/{locales → cjs/locales}/cy.cjs +8 -11
- package/{locales → cjs/locales}/da.cjs +8 -11
- package/cjs/locales/de-at.cjs +57 -0
- package/cjs/locales/de.cjs +57 -0
- package/{locales → cjs/locales}/el.cjs +9 -11
- package/{locales → cjs/locales}/en-au.cjs +4 -5
- package/{locales → cjs/locales}/en-gb.cjs +4 -5
- package/{locales → cjs/locales}/en-nz.cjs +4 -5
- package/{locales → cjs/locales}/eo.cjs +10 -12
- package/cjs/locales/es-us.cjs +34 -0
- package/cjs/locales/es.cjs +40 -0
- package/{locales → cjs/locales}/et.cjs +10 -12
- package/{locales → cjs/locales}/eu.cjs +10 -12
- package/{locales → cjs/locales}/fa.cjs +9 -11
- package/{locales → cjs/locales}/fi.cjs +10 -12
- package/cjs/locales/fr-ca.cjs +21 -0
- package/{locales → cjs/locales}/fr-ch.cjs +10 -12
- package/{locales → cjs/locales}/fr.cjs +10 -13
- package/cjs/locales/gl.cjs +40 -0
- package/{locales → cjs/locales}/he.cjs +8 -11
- package/{locales → cjs/locales}/hi.cjs +9 -11
- package/{locales → cjs/locales}/hr.cjs +10 -12
- package/{locales → cjs/locales}/hu.cjs +8 -11
- package/{locales → cjs/locales}/hy-am.cjs +9 -11
- package/{locales → cjs/locales}/id.cjs +10 -12
- package/{locales → cjs/locales}/is.cjs +8 -11
- package/{locales → cjs/locales}/it.cjs +10 -12
- package/{locales → cjs/locales}/ja.cjs +7 -10
- package/cjs/locales/ka.cjs +27 -0
- package/{locales → cjs/locales}/kk.cjs +9 -12
- package/{locales → cjs/locales}/km.cjs +7 -10
- package/{locales → cjs/locales}/ko.cjs +7 -10
- package/{locales → cjs/locales}/ku.cjs +7 -10
- package/{locales → cjs/locales}/lb.cjs +10 -12
- package/{locales → cjs/locales}/lt.cjs +10 -12
- package/{locales → cjs/locales}/lv.cjs +10 -12
- package/{locales → cjs/locales}/mk.cjs +9 -11
- package/{locales → cjs/locales}/ms.cjs +10 -12
- package/{locales → cjs/locales}/nb.cjs +11 -17
- package/{locales → cjs/locales}/ne.cjs +7 -10
- package/{locales → cjs/locales}/nl.cjs +8 -10
- package/{locales → cjs/locales}/nn.cjs +8 -11
- package/{locales → cjs/locales}/pl.cjs +10 -12
- package/cjs/locales/pt-br.cjs +40 -0
- package/{locales → cjs/locales}/pt.cjs +10 -12
- package/{locales → cjs/locales}/ro.cjs +10 -12
- package/{locales → cjs/locales}/ru.cjs +10 -12
- package/{locales → cjs/locales}/si-lk.cjs +9 -11
- package/{locales → cjs/locales}/sk.cjs +9 -11
- package/{locales → cjs/locales}/sl.cjs +7 -10
- package/{locales → cjs/locales}/sm.cjs +7 -10
- package/{locales → cjs/locales}/sq.cjs +10 -12
- package/{locales → cjs/locales}/sr-cyrl.cjs +9 -11
- package/{locales → cjs/locales}/sr.cjs +9 -11
- package/cjs/locales/sv.cjs +41 -0
- package/{locales → cjs/locales}/ta-in.cjs +8 -11
- package/{locales → cjs/locales}/th.cjs +9 -12
- package/{locales → cjs/locales}/tr.cjs +9 -11
- package/cjs/locales/ug.cjs +18 -0
- package/{locales → cjs/locales}/uk.cjs +10 -12
- package/{locales → cjs/locales}/uz-cy.cjs +7 -10
- package/{locales → cjs/locales}/uz.cjs +8 -10
- package/{locales → cjs/locales}/vi.cjs +9 -11
- package/{locales → cjs/locales}/zh-cn.cjs +7 -10
- package/{locales → cjs/locales}/zh-tw.cjs +7 -10
- package/{preact.cjs → cjs/preact.cjs} +1 -0
- package/esm/index.d.ts +53 -0
- package/{index.js → esm/index.js} +493 -369
- package/esm/internal-classnames.d.ts +1 -0
- package/esm/internal-classnames.js +3 -0
- package/{internal-common.d.ts → esm/internal-common.d.ts} +726 -693
- package/{internal-common.js → esm/internal-common.js} +5438 -5245
- package/esm/internal.d.ts +5 -0
- package/esm/internal.js +3 -0
- package/{locales → esm/locales}/af.js +8 -10
- package/{locales → esm/locales}/ar-dz.js +7 -10
- package/{locales → esm/locales}/ar-kw.js +7 -10
- package/{locales → esm/locales}/ar-ly.js +7 -10
- package/{locales → esm/locales}/ar-ma.js +7 -10
- package/{locales → esm/locales}/ar-sa.js +7 -10
- package/{locales → esm/locales}/ar-tn.js +7 -10
- package/{locales → esm/locales}/ar.js +7 -10
- package/{locales → esm/locales}/az.js +8 -11
- package/{locales → esm/locales}/bg.js +8 -10
- package/{locales → esm/locales}/bn.js +7 -10
- package/{locales → esm/locales}/bs.js +10 -12
- package/esm/locales/ca.js +21 -0
- package/{locales → esm/locales}/cs.js +9 -11
- package/{locales → esm/locales}/cy.js +8 -11
- package/{locales → esm/locales}/da.js +8 -11
- package/esm/locales/de-at.js +53 -0
- package/esm/locales/de.js +53 -0
- package/{locales → esm/locales}/el.js +9 -11
- package/{locales → esm/locales}/en-au.js +4 -5
- package/{locales → esm/locales}/en-gb.js +4 -5
- package/{locales → esm/locales}/en-nz.js +4 -5
- package/esm/locales/eo.js +21 -0
- package/esm/locales/es-us.js +30 -0
- package/esm/locales/es.js +36 -0
- package/{locales → esm/locales}/et.js +10 -12
- package/esm/locales/eu.js +21 -0
- package/{locales → esm/locales}/fa.js +9 -11
- package/esm/locales/fi.js +21 -0
- package/esm/locales/fr-ca.js +17 -0
- package/esm/locales/fr-ch.js +21 -0
- package/esm/locales/fr.js +21 -0
- package/esm/locales/gl.js +36 -0
- package/esm/locales/he.js +17 -0
- package/{locales → esm/locales}/hi.js +9 -11
- package/{locales → esm/locales}/hr.js +10 -12
- package/{locales → esm/locales}/hu.js +8 -11
- package/{locales → esm/locales}/hy-am.js +9 -11
- package/esm/locales/id.js +21 -0
- package/{locales → esm/locales}/is.js +8 -11
- package/{locales → esm/locales}/it.js +10 -12
- package/{locales → esm/locales}/ja.js +7 -10
- package/esm/locales/ka.js +23 -0
- package/esm/locales/kk.js +22 -0
- package/{locales → esm/locales}/km.js +7 -10
- package/esm/locales/ko.js +16 -0
- package/{locales → esm/locales}/ku.js +7 -10
- package/esm/locales/lb.js +21 -0
- package/esm/locales/lt.js +21 -0
- package/esm/locales/lv.js +23 -0
- package/esm/locales/mk.js +19 -0
- package/{locales → esm/locales}/ms.js +10 -12
- package/{locales → esm/locales}/nb.js +11 -17
- package/{locales → esm/locales}/ne.js +7 -10
- package/{locales → esm/locales}/nl.js +8 -10
- package/{locales → esm/locales}/nn.js +8 -11
- package/esm/locales/pl.js +21 -0
- package/esm/locales/pt-br.js +36 -0
- package/esm/locales/pt.js +21 -0
- package/{locales → esm/locales}/ro.js +10 -12
- package/esm/locales/ru.js +23 -0
- package/esm/locales/si-lk.js +21 -0
- package/{locales → esm/locales}/sk.js +9 -11
- package/{locales → esm/locales}/sl.js +7 -10
- package/esm/locales/sm.js +16 -0
- package/{locales → esm/locales}/sq.js +10 -12
- package/{locales → esm/locales}/sr-cyrl.js +9 -11
- package/{locales → esm/locales}/sr.js +9 -11
- package/esm/locales/sv.js +37 -0
- package/esm/locales/ta-in.js +22 -0
- package/esm/locales/th.js +22 -0
- package/{locales → esm/locales}/tr.js +9 -11
- package/esm/locales/ug.js +14 -0
- package/esm/locales/uk.js +23 -0
- package/{locales → esm/locales}/uz-cy.js +7 -10
- package/{locales → esm/locales}/uz.js +8 -10
- package/{locales → esm/locales}/vi.js +9 -11
- package/{locales → esm/locales}/zh-cn.js +7 -10
- package/esm/locales/zh-tw.js +16 -0
- package/{preact.d.ts → esm/preact.d.ts} +4 -3
- package/esm/preact.js +3 -0
- package/{locales/af.global.js → global/locales/af.js} +12 -14
- package/global/locales/af.min.js +6 -0
- package/{locales/ar-dz.global.js → global/locales/ar-dz.js} +11 -14
- package/global/locales/ar-dz.min.js +6 -0
- package/{locales/ar-kw.global.js → global/locales/ar-kw.js} +11 -14
- package/global/locales/ar-kw.min.js +6 -0
- package/{locales/ar-ly.global.js → global/locales/ar-ly.js} +11 -14
- package/global/locales/ar-ly.min.js +6 -0
- package/{locales/ar-ma.global.js → global/locales/ar-ma.js} +11 -14
- package/global/locales/ar-ma.min.js +6 -0
- package/{locales/ar-sa.global.js → global/locales/ar-sa.js} +11 -14
- package/global/locales/ar-sa.min.js +6 -0
- package/{locales/ar-tn.global.js → global/locales/ar-tn.js} +11 -14
- package/global/locales/ar-tn.min.js +6 -0
- package/{locales/ar.global.js → global/locales/ar.js} +11 -14
- package/global/locales/ar.min.js +6 -0
- package/{locales/az.global.js → global/locales/az.js} +12 -15
- package/global/locales/az.min.js +6 -0
- package/{locales/bg.global.js → global/locales/bg.js} +12 -14
- package/global/locales/bg.min.js +6 -0
- package/{locales/bn.global.js → global/locales/bn.js} +11 -14
- package/global/locales/bn.min.js +6 -0
- package/global/locales/bs.js +33 -0
- package/global/locales/bs.min.js +6 -0
- package/global/locales/ca.js +31 -0
- package/global/locales/ca.min.js +6 -0
- package/{locales/cs.global.js → global/locales/cs.js} +13 -15
- package/global/locales/cs.min.js +6 -0
- package/global/locales/cy.js +30 -0
- package/global/locales/cy.min.js +6 -0
- package/global/locales/da.js +30 -0
- package/global/locales/da.min.js +6 -0
- package/global/locales/de-at.js +63 -0
- package/global/locales/de-at.min.js +6 -0
- package/global/locales/de.js +63 -0
- package/global/locales/de.min.js +6 -0
- package/global/locales/el.js +31 -0
- package/global/locales/el.min.js +6 -0
- package/{locales/en-au.global.js → global/locales/en-au.js} +8 -9
- package/global/locales/en-au.min.js +6 -0
- package/{locales/en-gb.global.js → global/locales/en-gb.js} +8 -9
- package/global/locales/en-gb.min.js +6 -0
- package/{locales/en-nz.global.js → global/locales/en-nz.js} +8 -9
- package/global/locales/en-nz.min.js +6 -0
- package/global/locales/eo.js +31 -0
- package/global/locales/eo.min.js +6 -0
- package/global/locales/es-us.js +40 -0
- package/global/locales/es-us.min.js +6 -0
- package/global/locales/es.js +46 -0
- package/global/locales/es.min.js +6 -0
- package/global/locales/et.js +33 -0
- package/global/locales/et.min.js +6 -0
- package/global/locales/eu.js +31 -0
- package/global/locales/eu.min.js +6 -0
- package/{locales/fa.global.js → global/locales/fa.js} +13 -15
- package/global/locales/fa.min.js +6 -0
- package/global/locales/fi.js +31 -0
- package/global/locales/fi.min.js +6 -0
- package/global/locales/fr-ca.js +27 -0
- package/global/locales/fr-ca.min.js +6 -0
- package/global/locales/fr-ch.js +31 -0
- package/global/locales/fr-ch.min.js +6 -0
- package/global/locales/fr.js +31 -0
- package/global/locales/fr.min.js +6 -0
- package/global/locales/gl.js +46 -0
- package/global/locales/gl.min.js +6 -0
- package/global/locales/he.js +27 -0
- package/global/locales/he.min.js +6 -0
- package/{locales/hi.global.js → global/locales/hi.js} +13 -15
- package/global/locales/hi.min.js +6 -0
- package/global/locales/hr.js +33 -0
- package/global/locales/hr.min.js +6 -0
- package/global/locales/hu.js +30 -0
- package/global/locales/hu.min.js +6 -0
- package/{locales/hy-am.global.js → global/locales/hy-am.js} +13 -15
- package/global/locales/hy-am.min.js +6 -0
- package/global/locales/id.js +31 -0
- package/global/locales/id.min.js +6 -0
- package/global/locales/is.js +30 -0
- package/global/locales/is.min.js +6 -0
- package/global/locales/it.js +33 -0
- package/global/locales/it.min.js +6 -0
- package/global/locales/ja.js +28 -0
- package/global/locales/ja.min.js +6 -0
- package/global/locales/ka.js +33 -0
- package/global/locales/ka.min.js +6 -0
- package/global/locales/kk.js +32 -0
- package/global/locales/kk.min.js +6 -0
- package/{locales/km.global.js → global/locales/km.js} +11 -14
- package/global/locales/km.min.js +6 -0
- package/global/locales/ko.js +26 -0
- package/global/locales/ko.min.js +6 -0
- package/{locales/ku.global.js → global/locales/ku.js} +11 -14
- package/global/locales/ku.min.js +6 -0
- package/global/locales/lb.js +31 -0
- package/global/locales/lb.min.js +6 -0
- package/global/locales/lt.js +31 -0
- package/global/locales/lt.min.js +6 -0
- package/global/locales/lv.js +33 -0
- package/global/locales/lv.min.js +6 -0
- package/global/locales/mk.js +29 -0
- package/global/locales/mk.min.js +6 -0
- package/global/locales/ms.js +33 -0
- package/global/locales/ms.min.js +6 -0
- package/{locales/nb.global.js → global/locales/nb.js} +15 -21
- package/global/locales/nb.min.js +6 -0
- package/{locales/ne.global.js → global/locales/ne.js} +11 -14
- package/global/locales/ne.min.js +6 -0
- package/{locales/nl.global.js → global/locales/nl.js} +12 -14
- package/global/locales/nl.min.js +6 -0
- package/global/locales/nn.js +30 -0
- package/global/locales/nn.min.js +6 -0
- package/global/locales/pl.js +31 -0
- package/global/locales/pl.min.js +6 -0
- package/global/locales/pt-br.js +46 -0
- package/global/locales/pt-br.min.js +6 -0
- package/global/locales/pt.js +31 -0
- package/global/locales/pt.min.js +6 -0
- package/global/locales/ro.js +33 -0
- package/global/locales/ro.min.js +6 -0
- package/global/locales/ru.js +33 -0
- package/global/locales/ru.min.js +6 -0
- package/global/locales/si-lk.js +31 -0
- package/global/locales/si-lk.min.js +6 -0
- package/{locales/sk.global.js → global/locales/sk.js} +13 -15
- package/global/locales/sk.min.js +6 -0
- package/{locales/sl.global.js → global/locales/sl.js} +11 -14
- package/global/locales/sl.min.js +6 -0
- package/global/locales/sm.js +26 -0
- package/global/locales/sm.min.js +6 -0
- package/global/locales/sq.js +33 -0
- package/global/locales/sq.min.js +6 -0
- package/{locales/sr-cyrl.global.js → global/locales/sr-cyrl.js} +13 -15
- package/global/locales/sr-cyrl.min.js +6 -0
- package/{locales/sr.global.js → global/locales/sr.js} +13 -15
- package/global/locales/sr.min.js +6 -0
- package/global/locales/sv.js +47 -0
- package/global/locales/sv.min.js +6 -0
- package/global/locales/ta-in.js +32 -0
- package/global/locales/ta-in.min.js +6 -0
- package/global/locales/th.js +32 -0
- package/global/locales/th.min.js +6 -0
- package/{locales/tr.global.js → global/locales/tr.js} +13 -15
- package/global/locales/tr.min.js +6 -0
- package/global/locales/ug.js +24 -0
- package/global/locales/ug.min.js +6 -0
- package/global/locales/uk.js +33 -0
- package/global/locales/uk.min.js +6 -0
- package/{locales/uz-cy.global.js → global/locales/uz-cy.js} +11 -14
- package/global/locales/uz-cy.min.js +6 -0
- package/{locales/uz.global.js → global/locales/uz.js} +12 -14
- package/global/locales/uz.min.js +6 -0
- package/{locales/vi.global.js → global/locales/vi.js} +13 -15
- package/global/locales/vi.min.js +6 -0
- package/{locales/zh-cn.global.js → global/locales/zh-cn.js} +11 -14
- package/global/locales/zh-cn.min.js +6 -0
- package/global/locales/zh-tw.js +26 -0
- package/global/locales/zh-tw.min.js +6 -0
- package/global/locales-all.js +1730 -0
- package/global/locales-all.min.js +6 -0
- package/{index.global.js → global.js} +5204 -4877
- package/global.min.js +6 -0
- package/package.json +53 -35
- package/skeleton.css +477 -0
- package/skeleton.min.css +1 -0
- package/skeleton.styles.js +30 -0
- package/index.d.ts +0 -48
- package/index.global.min.js +0 -6
- package/internal.d.ts +0 -4
- package/internal.js +0 -3
- package/locales/af.global.min.js +0 -6
- package/locales/ar-dz.global.min.js +0 -6
- package/locales/ar-kw.global.min.js +0 -6
- package/locales/ar-ly.global.min.js +0 -6
- package/locales/ar-ma.global.min.js +0 -6
- package/locales/ar-sa.global.min.js +0 -6
- package/locales/ar-tn.global.min.js +0 -6
- package/locales/ar.global.min.js +0 -6
- package/locales/az.global.min.js +0 -6
- package/locales/bg.global.min.js +0 -6
- package/locales/bn.global.min.js +0 -6
- package/locales/bs.global.js +0 -35
- package/locales/bs.global.min.js +0 -6
- package/locales/ca.global.js +0 -33
- package/locales/ca.global.min.js +0 -6
- package/locales/ca.js +0 -23
- package/locales/cs.global.min.js +0 -6
- package/locales/cy.global.js +0 -33
- package/locales/cy.global.min.js +0 -6
- package/locales/da.global.js +0 -33
- package/locales/da.global.min.js +0 -6
- package/locales/de-at.cjs +0 -62
- package/locales/de-at.global.js +0 -68
- package/locales/de-at.global.min.js +0 -6
- package/locales/de-at.js +0 -58
- package/locales/de.cjs +0 -62
- package/locales/de.global.js +0 -68
- package/locales/de.global.min.js +0 -6
- package/locales/de.js +0 -58
- package/locales/el.global.js +0 -33
- package/locales/el.global.min.js +0 -6
- package/locales/en-au.global.min.js +0 -6
- package/locales/en-gb.global.min.js +0 -6
- package/locales/en-nz.global.min.js +0 -6
- package/locales/eo.global.js +0 -33
- package/locales/eo.global.min.js +0 -6
- package/locales/eo.js +0 -23
- package/locales/es-us.cjs +0 -27
- package/locales/es-us.global.js +0 -33
- package/locales/es-us.global.min.js +0 -6
- package/locales/es-us.js +0 -23
- package/locales/es.cjs +0 -45
- package/locales/es.global.js +0 -51
- package/locales/es.global.min.js +0 -6
- package/locales/es.js +0 -41
- package/locales/et.global.js +0 -35
- package/locales/et.global.min.js +0 -6
- package/locales/eu.global.js +0 -33
- package/locales/eu.global.min.js +0 -6
- package/locales/eu.js +0 -23
- package/locales/fa.global.min.js +0 -6
- package/locales/fi.global.js +0 -33
- package/locales/fi.global.min.js +0 -6
- package/locales/fi.js +0 -23
- package/locales/fr-ca.cjs +0 -23
- package/locales/fr-ca.global.js +0 -29
- package/locales/fr-ca.global.min.js +0 -6
- package/locales/fr-ca.js +0 -19
- package/locales/fr-ch.global.js +0 -33
- package/locales/fr-ch.global.min.js +0 -6
- package/locales/fr-ch.js +0 -23
- package/locales/fr.global.js +0 -34
- package/locales/fr.global.min.js +0 -6
- package/locales/fr.js +0 -24
- package/locales/gl.cjs +0 -45
- package/locales/gl.global.js +0 -51
- package/locales/gl.global.min.js +0 -6
- package/locales/gl.js +0 -41
- package/locales/he.global.js +0 -30
- package/locales/he.global.min.js +0 -6
- package/locales/he.js +0 -20
- package/locales/hi.global.min.js +0 -6
- package/locales/hr.global.js +0 -35
- package/locales/hr.global.min.js +0 -6
- package/locales/hu.global.js +0 -33
- package/locales/hu.global.min.js +0 -6
- package/locales/hy-am.global.min.js +0 -6
- package/locales/id.global.js +0 -33
- package/locales/id.global.min.js +0 -6
- package/locales/id.js +0 -23
- package/locales/is.global.js +0 -33
- package/locales/is.global.min.js +0 -6
- package/locales/it.global.js +0 -35
- package/locales/it.global.min.js +0 -6
- package/locales/ja.global.js +0 -31
- package/locales/ja.global.min.js +0 -6
- package/locales/ka.cjs +0 -29
- package/locales/ka.global.js +0 -35
- package/locales/ka.global.min.js +0 -6
- package/locales/ka.js +0 -25
- package/locales/kk.global.js +0 -35
- package/locales/kk.global.min.js +0 -6
- package/locales/kk.js +0 -25
- package/locales/km.global.min.js +0 -6
- package/locales/ko.global.js +0 -29
- package/locales/ko.global.min.js +0 -6
- package/locales/ko.js +0 -19
- package/locales/ku.global.min.js +0 -6
- package/locales/lb.global.js +0 -33
- package/locales/lb.global.min.js +0 -6
- package/locales/lb.js +0 -23
- package/locales/lt.global.js +0 -33
- package/locales/lt.global.min.js +0 -6
- package/locales/lt.js +0 -23
- package/locales/lv.global.js +0 -35
- package/locales/lv.global.min.js +0 -6
- package/locales/lv.js +0 -25
- package/locales/mk.global.js +0 -31
- package/locales/mk.global.min.js +0 -6
- package/locales/mk.js +0 -21
- package/locales/ms.global.js +0 -35
- package/locales/ms.global.min.js +0 -6
- package/locales/nb.global.min.js +0 -6
- package/locales/ne.global.min.js +0 -6
- package/locales/nl.global.min.js +0 -6
- package/locales/nn.global.js +0 -33
- package/locales/nn.global.min.js +0 -6
- package/locales/pl.global.js +0 -33
- package/locales/pl.global.min.js +0 -6
- package/locales/pl.js +0 -23
- package/locales/pt-br.cjs +0 -45
- package/locales/pt-br.global.js +0 -51
- package/locales/pt-br.global.min.js +0 -6
- package/locales/pt-br.js +0 -41
- package/locales/pt.global.js +0 -33
- package/locales/pt.global.min.js +0 -6
- package/locales/pt.js +0 -23
- package/locales/ro.global.js +0 -35
- package/locales/ro.global.min.js +0 -6
- package/locales/ru.global.js +0 -35
- package/locales/ru.global.min.js +0 -6
- package/locales/ru.js +0 -25
- package/locales/si-lk.global.js +0 -33
- package/locales/si-lk.global.min.js +0 -6
- package/locales/si-lk.js +0 -23
- package/locales/sk.global.min.js +0 -6
- package/locales/sl.global.min.js +0 -6
- package/locales/sm.global.js +0 -29
- package/locales/sm.global.min.js +0 -6
- package/locales/sm.js +0 -19
- package/locales/sq.global.js +0 -35
- package/locales/sq.global.min.js +0 -6
- package/locales/sr-cyrl.global.min.js +0 -6
- package/locales/sr.global.min.js +0 -6
- package/locales/sv.cjs +0 -46
- package/locales/sv.global.js +0 -52
- package/locales/sv.global.min.js +0 -6
- package/locales/sv.js +0 -42
- package/locales/ta-in.global.js +0 -35
- package/locales/ta-in.global.min.js +0 -6
- package/locales/ta-in.js +0 -25
- package/locales/th.global.js +0 -35
- package/locales/th.global.min.js +0 -6
- package/locales/th.js +0 -25
- package/locales/tr.global.min.js +0 -6
- package/locales/ug.cjs +0 -20
- package/locales/ug.global.js +0 -26
- package/locales/ug.global.min.js +0 -6
- package/locales/ug.js +0 -16
- package/locales/uk.global.js +0 -35
- package/locales/uk.global.min.js +0 -6
- package/locales/uk.js +0 -25
- package/locales/uz-cy.global.min.js +0 -6
- package/locales/uz.global.min.js +0 -6
- package/locales/vi.global.min.js +0 -6
- package/locales/zh-cn.global.min.js +0 -6
- package/locales/zh-tw.global.js +0 -29
- package/locales/zh-tw.global.min.js +0 -6
- package/locales/zh-tw.js +0 -19
- package/locales-all.global.js +0 -1927
- package/locales-all.global.min.js +0 -6
- package/preact.js +0 -3
- /package/{locales-all.cjs → cjs/locales-all.cjs} +0 -0
- /package/{locales → esm/locales}/af.d.ts +0 -0
- /package/{locales → esm/locales}/ar-dz.d.ts +0 -0
- /package/{locales → esm/locales}/ar-kw.d.ts +0 -0
- /package/{locales → esm/locales}/ar-ly.d.ts +0 -0
- /package/{locales → esm/locales}/ar-ma.d.ts +0 -0
- /package/{locales → esm/locales}/ar-sa.d.ts +0 -0
- /package/{locales → esm/locales}/ar-tn.d.ts +0 -0
- /package/{locales → esm/locales}/ar.d.ts +0 -0
- /package/{locales → esm/locales}/az.d.ts +0 -0
- /package/{locales → esm/locales}/bg.d.ts +0 -0
- /package/{locales → esm/locales}/bn.d.ts +0 -0
- /package/{locales → esm/locales}/bs.d.ts +0 -0
- /package/{locales → esm/locales}/ca.d.ts +0 -0
- /package/{locales → esm/locales}/cs.d.ts +0 -0
- /package/{locales → esm/locales}/cy.d.ts +0 -0
- /package/{locales → esm/locales}/da.d.ts +0 -0
- /package/{locales → esm/locales}/de-at.d.ts +0 -0
- /package/{locales → esm/locales}/de.d.ts +0 -0
- /package/{locales → esm/locales}/el.d.ts +0 -0
- /package/{locales → esm/locales}/en-au.d.ts +0 -0
- /package/{locales → esm/locales}/en-gb.d.ts +0 -0
- /package/{locales → esm/locales}/en-nz.d.ts +0 -0
- /package/{locales → esm/locales}/eo.d.ts +0 -0
- /package/{locales → esm/locales}/es-us.d.ts +0 -0
- /package/{locales → esm/locales}/es.d.ts +0 -0
- /package/{locales → esm/locales}/et.d.ts +0 -0
- /package/{locales → esm/locales}/eu.d.ts +0 -0
- /package/{locales → esm/locales}/fa.d.ts +0 -0
- /package/{locales → esm/locales}/fi.d.ts +0 -0
- /package/{locales → esm/locales}/fr-ca.d.ts +0 -0
- /package/{locales → esm/locales}/fr-ch.d.ts +0 -0
- /package/{locales → esm/locales}/fr.d.ts +0 -0
- /package/{locales → esm/locales}/gl.d.ts +0 -0
- /package/{locales → esm/locales}/he.d.ts +0 -0
- /package/{locales → esm/locales}/hi.d.ts +0 -0
- /package/{locales → esm/locales}/hr.d.ts +0 -0
- /package/{locales → esm/locales}/hu.d.ts +0 -0
- /package/{locales → esm/locales}/hy-am.d.ts +0 -0
- /package/{locales → esm/locales}/id.d.ts +0 -0
- /package/{locales → esm/locales}/is.d.ts +0 -0
- /package/{locales → esm/locales}/it.d.ts +0 -0
- /package/{locales → esm/locales}/ja.d.ts +0 -0
- /package/{locales → esm/locales}/ka.d.ts +0 -0
- /package/{locales → esm/locales}/kk.d.ts +0 -0
- /package/{locales → esm/locales}/km.d.ts +0 -0
- /package/{locales → esm/locales}/ko.d.ts +0 -0
- /package/{locales → esm/locales}/ku.d.ts +0 -0
- /package/{locales → esm/locales}/lb.d.ts +0 -0
- /package/{locales → esm/locales}/lt.d.ts +0 -0
- /package/{locales → esm/locales}/lv.d.ts +0 -0
- /package/{locales → esm/locales}/mk.d.ts +0 -0
- /package/{locales → esm/locales}/ms.d.ts +0 -0
- /package/{locales → esm/locales}/nb.d.ts +0 -0
- /package/{locales → esm/locales}/ne.d.ts +0 -0
- /package/{locales → esm/locales}/nl.d.ts +0 -0
- /package/{locales → esm/locales}/nn.d.ts +0 -0
- /package/{locales → esm/locales}/pl.d.ts +0 -0
- /package/{locales → esm/locales}/pt-br.d.ts +0 -0
- /package/{locales → esm/locales}/pt.d.ts +0 -0
- /package/{locales → esm/locales}/ro.d.ts +0 -0
- /package/{locales → esm/locales}/ru.d.ts +0 -0
- /package/{locales → esm/locales}/si-lk.d.ts +0 -0
- /package/{locales → esm/locales}/sk.d.ts +0 -0
- /package/{locales → esm/locales}/sl.d.ts +0 -0
- /package/{locales → esm/locales}/sm.d.ts +0 -0
- /package/{locales → esm/locales}/sq.d.ts +0 -0
- /package/{locales → esm/locales}/sr-cyrl.d.ts +0 -0
- /package/{locales → esm/locales}/sr.d.ts +0 -0
- /package/{locales → esm/locales}/sv.d.ts +0 -0
- /package/{locales → esm/locales}/ta-in.d.ts +0 -0
- /package/{locales → esm/locales}/th.d.ts +0 -0
- /package/{locales → esm/locales}/tr.d.ts +0 -0
- /package/{locales → esm/locales}/ug.d.ts +0 -0
- /package/{locales → esm/locales}/uk.d.ts +0 -0
- /package/{locales → esm/locales}/uz-cy.d.ts +0 -0
- /package/{locales → esm/locales}/uz.d.ts +0 -0
- /package/{locales → esm/locales}/vi.d.ts +0 -0
- /package/{locales → esm/locales}/zh-cn.d.ts +0 -0
- /package/{locales → esm/locales}/zh-tw.d.ts +0 -0
- /package/{locales-all.d.ts → esm/locales-all.d.ts} +0 -0
- /package/{locales-all.js → esm/locales-all.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
export { ag as JsonRequestError } from './internal-common.js';
|
|
3
|
-
import { createElement,
|
|
1
|
+
import { m as mergeCalendarOptions, g as guid, i as isArraysEqual, a as mergeViewOptionsMap, b as mapHash, B as BaseComponent, V as ViewContextType, C as ContentContainer, c as generateClassName, d as greatestDurationDenominator, e as createDuration, 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 isPropsEqualShallow, F as Emitter, G as getInitialDate, H as rangeContainsMarker, I as createEmptyEventStore, J as reduceCurrentDate, K as reduceEventStore, L as rezoneEventStoreDates, M as BASE_OPTION_DEFAULTS, N as BASE_OPTION_REFINERS, O as CALENDAR_LISTENER_REFINERS, P as CALENDAR_ONLY_OPTION_REFINERS, Q as COMPLEX_OPTION_COMPARATORS, R as VIEW_ONLY_OPTION_REFINERS, S as DateEnv, T as DateProfileGenerator, U as createEventUi, W as parseBusinessHours, X as Interaction, Y as getElEventRange, Z as EventImpl, _ as listenBySelector, $ as classNames, a0 as listenToHoverBySelector, a1 as joinArrayishClassNames, a2 as joinClassNames, a3 as PureComponent, a4 as buildViewContext, a5 as getUniqueDomId, a6 as parseInteractionSettings, a7 as interactionSettingsStore, a8 as getIsHeightAuto, a9 as CalendarImpl, aa as flushSync, ab as CalendarRoot, ac as getNow, ad as RenderId, ae as applyStyleProp, af as sliceEventStore } from './internal-common.js';
|
|
2
|
+
export { ag as JsonRequestError, a2 as joinClassNames } from './internal-common.js';
|
|
3
|
+
import { createElement, Fragment, render } from 'preact';
|
|
4
4
|
import 'preact/compat';
|
|
5
5
|
|
|
6
6
|
const globalLocales = [];
|
|
@@ -12,39 +12,34 @@ const MINIMAL_RAW_EN_LOCALE = {
|
|
|
12
12
|
doy: 4, // 4 days need to be within the year to be considered the first week
|
|
13
13
|
},
|
|
14
14
|
direction: 'ltr',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
list: 'list',
|
|
26
|
-
},
|
|
27
|
-
weekText: 'W',
|
|
28
|
-
weekTextLong: 'Week',
|
|
15
|
+
todayText: 'Today',
|
|
16
|
+
prevText: 'Prev',
|
|
17
|
+
nextText: 'Next',
|
|
18
|
+
prevYearText: 'Prev year',
|
|
19
|
+
nextYearText: 'Next year',
|
|
20
|
+
yearText: 'Year',
|
|
21
|
+
monthText: 'Month',
|
|
22
|
+
weekText: 'Week',
|
|
23
|
+
dayText: 'Day',
|
|
24
|
+
listText: 'List',
|
|
29
25
|
closeHint: 'Close',
|
|
30
26
|
eventsHint: 'Events',
|
|
31
|
-
allDayText: '
|
|
32
|
-
timedText: '
|
|
27
|
+
allDayText: 'All-day',
|
|
28
|
+
timedText: 'Timed',
|
|
33
29
|
moreLinkText: 'more',
|
|
34
30
|
noEventsText: 'No events to display',
|
|
35
31
|
};
|
|
32
|
+
/*
|
|
33
|
+
Includes things we don't want other locales to inherit,
|
|
34
|
+
things that derive from other translatable strings.
|
|
35
|
+
*/
|
|
36
36
|
const RAW_EN_LOCALE = Object.assign(Object.assign({}, MINIMAL_RAW_EN_LOCALE), {
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return (unit === 'day')
|
|
44
|
-
? 'Today'
|
|
45
|
-
: `This ${buttonText}`;
|
|
46
|
-
},
|
|
47
|
-
}, viewHint: '$0 view', viewChangeHint: 'Change view', navLinkHint: 'Go to $0', moreLinkHint(eventCnt) {
|
|
37
|
+
// if a locale doesn't define this, fall back to weekText, don't use EN
|
|
38
|
+
weekTextShort: 'W', todayHint: (unitText, unit) => {
|
|
39
|
+
return (unit === 'day')
|
|
40
|
+
? 'Today'
|
|
41
|
+
: `This ${unitText}`;
|
|
42
|
+
}, prevHint: 'Previous $0', nextHint: 'Next $0', viewHint: '$0 view', viewChangeHint: 'Change view', navLinkHint: 'Go to $0', moreLinkHint(eventCnt) {
|
|
48
43
|
return `Show ${eventCnt} more event${eventCnt === 1 ? '' : 's'}`;
|
|
49
44
|
} });
|
|
50
45
|
function organizeRawLocales(explicitRawLocales) {
|
|
@@ -85,7 +80,7 @@ function queryRawLocale(codes, available) {
|
|
|
85
80
|
return null;
|
|
86
81
|
}
|
|
87
82
|
function parseLocale(codeArg, codes, raw) {
|
|
88
|
-
let merged =
|
|
83
|
+
let merged = mergeCalendarOptions(MINIMAL_RAW_EN_LOCALE, raw);
|
|
89
84
|
delete merged.code; // don't want this part of the options
|
|
90
85
|
let { week } = merged;
|
|
91
86
|
delete merged.week;
|
|
@@ -125,7 +120,6 @@ function createPlugin(input) {
|
|
|
125
120
|
eventDropTransformers: input.eventDropTransformers || [],
|
|
126
121
|
componentInteractions: input.componentInteractions || [],
|
|
127
122
|
calendarInteractions: input.calendarInteractions || [],
|
|
128
|
-
themeClasses: input.themeClasses || {},
|
|
129
123
|
eventSourceDefs: input.eventSourceDefs || [],
|
|
130
124
|
cmdFormatter: input.cmdFormatter,
|
|
131
125
|
recurringTypes: input.recurringTypes || [],
|
|
@@ -136,6 +130,7 @@ function createPlugin(input) {
|
|
|
136
130
|
scrollerSyncerClass: input.scrollerSyncerClass || null,
|
|
137
131
|
listenerRefiners: input.listenerRefiners || {},
|
|
138
132
|
optionRefiners: input.optionRefiners || {},
|
|
133
|
+
optionDefaults: input.optionDefaults ? [input.optionDefaults] : [],
|
|
139
134
|
propSetHandlers: input.propSetHandlers || {},
|
|
140
135
|
};
|
|
141
136
|
}
|
|
@@ -163,7 +158,6 @@ function buildPluginHooks(pluginDefs, globalDefs) {
|
|
|
163
158
|
eventDropTransformers: [],
|
|
164
159
|
componentInteractions: [],
|
|
165
160
|
calendarInteractions: [],
|
|
166
|
-
themeClasses: {},
|
|
167
161
|
eventSourceDefs: [],
|
|
168
162
|
cmdFormatter: null,
|
|
169
163
|
recurringTypes: [],
|
|
@@ -174,6 +168,7 @@ function buildPluginHooks(pluginDefs, globalDefs) {
|
|
|
174
168
|
scrollerSyncerClass: null,
|
|
175
169
|
listenerRefiners: {},
|
|
176
170
|
optionRefiners: {},
|
|
171
|
+
optionDefaults: [],
|
|
177
172
|
propSetHandlers: {},
|
|
178
173
|
};
|
|
179
174
|
function addDefs(defs) {
|
|
@@ -225,7 +220,7 @@ function combineHooks(hooks0, hooks1) {
|
|
|
225
220
|
dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),
|
|
226
221
|
datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),
|
|
227
222
|
dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),
|
|
228
|
-
views:
|
|
223
|
+
views: mergeViewOptionsMap(hooks0.views, hooks1.views),
|
|
229
224
|
viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),
|
|
230
225
|
isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,
|
|
231
226
|
externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),
|
|
@@ -233,7 +228,6 @@ function combineHooks(hooks0, hooks1) {
|
|
|
233
228
|
eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),
|
|
234
229
|
calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),
|
|
235
230
|
componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),
|
|
236
|
-
themeClasses: Object.assign(Object.assign({}, hooks0.themeClasses), hooks1.themeClasses),
|
|
237
231
|
eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),
|
|
238
232
|
cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,
|
|
239
233
|
recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),
|
|
@@ -244,6 +238,7 @@ function combineHooks(hooks0, hooks1) {
|
|
|
244
238
|
scrollerSyncerClass: hooks0.scrollerSyncerClass || hooks1.scrollerSyncerClass,
|
|
245
239
|
listenerRefiners: Object.assign(Object.assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),
|
|
246
240
|
optionRefiners: Object.assign(Object.assign({}, hooks0.optionRefiners), hooks1.optionRefiners),
|
|
241
|
+
optionDefaults: hooks0.optionDefaults.concat(hooks1.optionDefaults),
|
|
247
242
|
propSetHandlers: Object.assign(Object.assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers),
|
|
248
243
|
};
|
|
249
244
|
}
|
|
@@ -257,32 +252,6 @@ function compareOptionalDates(date0, date1) {
|
|
|
257
252
|
return new Date(Math.max(date0.valueOf(), date1.valueOf()));
|
|
258
253
|
}
|
|
259
254
|
|
|
260
|
-
class StandardTheme extends Theme {
|
|
261
|
-
}
|
|
262
|
-
StandardTheme.prototype.classes = {
|
|
263
|
-
root: 'fc-theme-standard',
|
|
264
|
-
buttonGroup: 'fc-button-group',
|
|
265
|
-
button: 'fc-button fc-button-primary',
|
|
266
|
-
buttonActive: 'fc-button-active',
|
|
267
|
-
};
|
|
268
|
-
StandardTheme.prototype.baseIconClass = 'fc-icon';
|
|
269
|
-
StandardTheme.prototype.iconClasses = {
|
|
270
|
-
close: 'fc-icon-x',
|
|
271
|
-
prev: 'fc-icon-chevron-left',
|
|
272
|
-
next: 'fc-icon-chevron-right',
|
|
273
|
-
prevYear: 'fc-icon-chevrons-left',
|
|
274
|
-
nextYear: 'fc-icon-chevrons-right',
|
|
275
|
-
};
|
|
276
|
-
StandardTheme.prototype.rtlIconClasses = {
|
|
277
|
-
prev: 'fc-icon-chevron-right',
|
|
278
|
-
next: 'fc-icon-chevron-left',
|
|
279
|
-
prevYear: 'fc-icon-chevrons-right',
|
|
280
|
-
nextYear: 'fc-icon-chevrons-left',
|
|
281
|
-
};
|
|
282
|
-
StandardTheme.prototype.iconOverrideOption = 'buttonIcons'; // TODO: make TS-friendly
|
|
283
|
-
StandardTheme.prototype.iconOverrideCustomButtonOption = 'icon';
|
|
284
|
-
StandardTheme.prototype.iconOverridePrefix = 'fc-icon-';
|
|
285
|
-
|
|
286
255
|
function compileViewDefs(defaultConfigs, overrideConfigs) {
|
|
287
256
|
let hash = {};
|
|
288
257
|
let viewType;
|
|
@@ -327,8 +296,8 @@ function buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) {
|
|
|
327
296
|
return {
|
|
328
297
|
type: viewType,
|
|
329
298
|
component: theComponent,
|
|
330
|
-
defaults:
|
|
331
|
-
overrides:
|
|
299
|
+
defaults: mergeCalendarOptions(superDef ? superDef.defaults : {}, defaultConfig ? defaultConfig.rawOptions : {}),
|
|
300
|
+
overrides: mergeCalendarOptions(superDef ? superDef.overrides : {}, overrideConfig ? overrideConfig.rawOptions : {}),
|
|
332
301
|
};
|
|
333
302
|
}
|
|
334
303
|
|
|
@@ -356,16 +325,21 @@ function parseViewConfig(input) {
|
|
|
356
325
|
};
|
|
357
326
|
}
|
|
358
327
|
function createViewHookComponent(options) {
|
|
359
|
-
return (viewProps) => (createElement(ViewContextType.Consumer, null, (context) =>
|
|
328
|
+
return (viewProps) => (createElement(ViewContextType.Consumer, null, (context) => {
|
|
329
|
+
var _a;
|
|
330
|
+
return (createElement(ContentContainer, { tag: "div", className: generateClassName(options.viewClass, {
|
|
331
|
+
view: context.viewApi,
|
|
332
|
+
}), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: ((_a = options.class) !== null && _a !== void 0 ? _a : options.className), didMount: options.didMount, willUnmount: options.willUnmount }));
|
|
333
|
+
}));
|
|
360
334
|
}
|
|
361
335
|
|
|
362
|
-
function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides
|
|
336
|
+
function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides) {
|
|
363
337
|
let defaultConfigs = parseViewConfigs(defaultInputs);
|
|
364
338
|
let overrideConfigs = parseViewConfigs(optionOverrides.views);
|
|
365
339
|
let viewDefs = compileViewDefs(defaultConfigs, overrideConfigs);
|
|
366
|
-
return mapHash(viewDefs, (viewDef) => buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides
|
|
340
|
+
return mapHash(viewDefs, (viewDef) => buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides));
|
|
367
341
|
}
|
|
368
|
-
function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides
|
|
342
|
+
function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides) {
|
|
369
343
|
let durationInput = viewDef.overrides.duration ||
|
|
370
344
|
viewDef.defaults.duration ||
|
|
371
345
|
dynamicOptionOverrides.duration ||
|
|
@@ -385,34 +359,6 @@ function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionO
|
|
|
385
359
|
}
|
|
386
360
|
}
|
|
387
361
|
}
|
|
388
|
-
let queryButtonText = (optionsSubset) => {
|
|
389
|
-
let buttonTextMap = optionsSubset.buttonText || {};
|
|
390
|
-
let buttonTextKey = viewDef.defaults.buttonTextKey;
|
|
391
|
-
if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) {
|
|
392
|
-
return buttonTextMap[buttonTextKey];
|
|
393
|
-
}
|
|
394
|
-
if (buttonTextMap[viewDef.type] != null) {
|
|
395
|
-
return buttonTextMap[viewDef.type];
|
|
396
|
-
}
|
|
397
|
-
if (buttonTextMap[singleUnit] != null) {
|
|
398
|
-
return buttonTextMap[singleUnit];
|
|
399
|
-
}
|
|
400
|
-
return null;
|
|
401
|
-
};
|
|
402
|
-
let queryButtonTitle = (optionsSubset) => {
|
|
403
|
-
let buttonHints = optionsSubset.buttonHints || {};
|
|
404
|
-
let buttonKey = viewDef.defaults.buttonTextKey; // use same key as text
|
|
405
|
-
if (buttonKey != null && buttonHints[buttonKey] != null) {
|
|
406
|
-
return buttonHints[buttonKey];
|
|
407
|
-
}
|
|
408
|
-
if (buttonHints[viewDef.type] != null) {
|
|
409
|
-
return buttonHints[viewDef.type];
|
|
410
|
-
}
|
|
411
|
-
if (buttonHints[singleUnit] != null) {
|
|
412
|
-
return buttonHints[singleUnit];
|
|
413
|
-
}
|
|
414
|
-
return null;
|
|
415
|
-
};
|
|
416
362
|
return {
|
|
417
363
|
type: viewDef.type,
|
|
418
364
|
component: viewDef.component,
|
|
@@ -421,21 +367,6 @@ function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionO
|
|
|
421
367
|
singleUnit,
|
|
422
368
|
optionDefaults: viewDef.defaults,
|
|
423
369
|
optionOverrides: Object.assign(Object.assign({}, singleUnitOverrides), viewDef.overrides),
|
|
424
|
-
buttonTextOverride: queryButtonText(dynamicOptionOverrides) ||
|
|
425
|
-
queryButtonText(optionOverrides) || // constructor-specified buttonText lookup hash takes precedence
|
|
426
|
-
viewDef.overrides.buttonText,
|
|
427
|
-
buttonTextDefault: queryButtonText(localeDefaults) ||
|
|
428
|
-
viewDef.defaults.buttonText ||
|
|
429
|
-
queryButtonText(BASE_OPTION_DEFAULTS) ||
|
|
430
|
-
viewDef.type,
|
|
431
|
-
// not DRY
|
|
432
|
-
buttonTitleOverride: queryButtonTitle(dynamicOptionOverrides) ||
|
|
433
|
-
queryButtonTitle(optionOverrides) ||
|
|
434
|
-
viewDef.overrides.buttonHint,
|
|
435
|
-
buttonTitleDefault: queryButtonTitle(localeDefaults) ||
|
|
436
|
-
viewDef.defaults.buttonHint ||
|
|
437
|
-
queryButtonTitle(BASE_OPTION_DEFAULTS),
|
|
438
|
-
// will eventually fall back to buttonText
|
|
439
370
|
};
|
|
440
371
|
}
|
|
441
372
|
// hack to get memoization working
|
|
@@ -710,17 +641,17 @@ function reduceEventResize(currentResize, action) {
|
|
|
710
641
|
}
|
|
711
642
|
}
|
|
712
643
|
|
|
713
|
-
function parseToolbars(calendarOptions,
|
|
714
|
-
let header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions,
|
|
715
|
-
let footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions,
|
|
644
|
+
function parseToolbars(calendarOptions, viewSpecs, calendarApi) {
|
|
645
|
+
let header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, viewSpecs, calendarApi) : null;
|
|
646
|
+
let footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, viewSpecs, calendarApi) : null;
|
|
716
647
|
return { header, footer };
|
|
717
648
|
}
|
|
718
|
-
function parseToolbar(sectionStrHash, calendarOptions,
|
|
649
|
+
function parseToolbar(sectionStrHash, calendarOptions, viewSpecs, calendarApi) {
|
|
719
650
|
let isRtl = calendarOptions.direction === 'rtl';
|
|
720
651
|
let viewsWithButtons = [];
|
|
721
652
|
let hasTitle = false;
|
|
722
653
|
function processSectionStr(sectionStr) {
|
|
723
|
-
let sectionRes = parseSection(sectionStr, calendarOptions,
|
|
654
|
+
let sectionRes = parseSection(sectionStr, calendarOptions, viewSpecs, calendarApi);
|
|
724
655
|
viewsWithButtons.push(...sectionRes.viewsWithButtons);
|
|
725
656
|
hasTitle = hasTitle || sectionRes.hasTitle;
|
|
726
657
|
return sectionRes.widgets;
|
|
@@ -739,82 +670,92 @@ function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides,
|
|
|
739
670
|
/*
|
|
740
671
|
BAD: querying icons and text here. should be done at render time
|
|
741
672
|
*/
|
|
742
|
-
function parseSection(sectionStr, calendarOptions,
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
let isRtl = calendarOptions.direction === 'rtl';
|
|
746
|
-
let calendarCustomButtons = calendarOptions.customButtons || {};
|
|
747
|
-
let calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {};
|
|
748
|
-
let calendarButtonText = calendarOptions.buttonText || {};
|
|
749
|
-
let calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {};
|
|
750
|
-
let calendarButtonHints = calendarOptions.buttonHints || {};
|
|
673
|
+
function parseSection(sectionStr, calendarOptions, viewSpecs, calendarApi) {
|
|
674
|
+
let calendarButtons = calendarOptions.buttons || {};
|
|
675
|
+
let customElements = calendarOptions.toolbarElements || {};
|
|
751
676
|
let sectionSubstrs = sectionStr ? sectionStr.split(' ') : [];
|
|
752
677
|
let viewsWithButtons = [];
|
|
753
678
|
let hasTitle = false;
|
|
754
|
-
let widgets = sectionSubstrs.map((buttonGroupStr) => (buttonGroupStr.split(',').map((
|
|
755
|
-
|
|
679
|
+
let widgets = sectionSubstrs.map((buttonGroupStr) => (buttonGroupStr.split(',').map((name) => {
|
|
680
|
+
var _a;
|
|
681
|
+
if (name === 'title') {
|
|
756
682
|
hasTitle = true;
|
|
757
|
-
return {
|
|
683
|
+
return { name };
|
|
684
|
+
}
|
|
685
|
+
if (customElements[name]) {
|
|
686
|
+
return { name, customElement: customElements[name] };
|
|
758
687
|
}
|
|
759
|
-
let customButtonProps;
|
|
760
688
|
let viewSpec;
|
|
761
|
-
let
|
|
762
|
-
let
|
|
763
|
-
let buttonText; // "
|
|
689
|
+
let buttonInput = calendarButtons[name] || {};
|
|
690
|
+
let buttonText;
|
|
764
691
|
let buttonHint;
|
|
765
|
-
let
|
|
766
|
-
|
|
767
|
-
|
|
692
|
+
let buttonClick;
|
|
693
|
+
if ((viewSpec = viewSpecs[name])) {
|
|
694
|
+
viewsWithButtons.push(name);
|
|
695
|
+
const buttonTextKey = viewSpec.optionDefaults.buttonTextKey;
|
|
696
|
+
buttonText = buttonInput.text ||
|
|
697
|
+
(buttonTextKey ? calendarOptions[buttonTextKey] : '') ||
|
|
698
|
+
(viewSpec.singleUnit ? calendarOptions[viewSpec.singleUnit + 'Text'] : '') ||
|
|
699
|
+
name;
|
|
700
|
+
/*
|
|
701
|
+
buttons{}.hint(viewButtonText, viewName)
|
|
702
|
+
viewHint(viewButtonText, viewName)
|
|
703
|
+
*/
|
|
704
|
+
buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.viewHint, [buttonText, name], // ordinal arguments
|
|
705
|
+
buttonText);
|
|
768
706
|
buttonClick = (ev) => {
|
|
769
|
-
|
|
770
|
-
|
|
707
|
+
var _a;
|
|
708
|
+
(_a = buttonInput === null || buttonInput === void 0 ? void 0 : buttonInput.click) === null || _a === void 0 ? void 0 : _a.call(buttonInput, ev);
|
|
709
|
+
if (!ev.defaultPrevented) {
|
|
710
|
+
calendarApi.changeView(name);
|
|
771
711
|
}
|
|
772
712
|
};
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
(
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride ||
|
|
790
|
-
viewSpec.buttonTitleDefault ||
|
|
791
|
-
calendarOptions.viewHint, [textFallback, buttonName], // view-name = buttonName
|
|
792
|
-
textFallback);
|
|
793
|
-
}
|
|
794
|
-
else if (calendarApi[buttonName]) { // a calendarApi method
|
|
795
|
-
buttonClick = () => {
|
|
796
|
-
calendarApi[buttonName]();
|
|
797
|
-
};
|
|
798
|
-
(buttonText = calendarButtonTextOverrides[buttonName]) ||
|
|
799
|
-
(buttonIcon = theme.getIconClass(buttonName, isRtl)) ||
|
|
800
|
-
(buttonText = calendarButtonText[buttonName]); // everything else is considered default
|
|
801
|
-
if (buttonName === 'prevYear' || buttonName === 'nextYear') {
|
|
802
|
-
let prevOrNext = buttonName === 'prevYear' ? 'prev' : 'next';
|
|
803
|
-
buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] ||
|
|
804
|
-
calendarButtonHints[prevOrNext], [
|
|
805
|
-
calendarButtonText.year || 'year',
|
|
806
|
-
'year',
|
|
807
|
-
], calendarButtonText[buttonName]);
|
|
713
|
+
}
|
|
714
|
+
else {
|
|
715
|
+
buttonText = buttonInput.text ||
|
|
716
|
+
calendarOptions[name + 'Text'] ||
|
|
717
|
+
name;
|
|
718
|
+
/*
|
|
719
|
+
button{}.hint(currentUnitText, currentUnit)
|
|
720
|
+
prevHint(currentUnitUnitext, currentUnit)
|
|
721
|
+
nextHint -- same
|
|
722
|
+
todayHint -- same
|
|
723
|
+
*/
|
|
724
|
+
if (name === 'prevYear') {
|
|
725
|
+
buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.prevHint, [calendarOptions.yearText, 'year'], buttonText);
|
|
726
|
+
}
|
|
727
|
+
else if (name === 'nextYear') {
|
|
728
|
+
buttonHint = formatWithOrdinals(buttonInput.hint || calendarOptions.nextHint, [calendarOptions.yearText, 'year'], buttonText);
|
|
808
729
|
}
|
|
809
730
|
else {
|
|
810
|
-
buttonHint = (
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
731
|
+
buttonHint = (currentUnit) => {
|
|
732
|
+
return formatWithOrdinals(buttonInput.hint || calendarOptions[name + 'Hint'], // todayHint/prevHint/nextHint
|
|
733
|
+
[calendarOptions[currentUnit + 'Text'], currentUnit], // ordinal arguments
|
|
734
|
+
buttonText);
|
|
735
|
+
};
|
|
815
736
|
}
|
|
737
|
+
buttonClick = (ev) => {
|
|
738
|
+
var _a, _b;
|
|
739
|
+
(_a = buttonInput === null || buttonInput === void 0 ? void 0 : buttonInput.click) === null || _a === void 0 ? void 0 : _a.call(buttonInput, ev);
|
|
740
|
+
if (!ev.defaultPrevented) {
|
|
741
|
+
(_b = calendarApi[name]) === null || _b === void 0 ? void 0 : _b.call(calendarApi);
|
|
742
|
+
}
|
|
743
|
+
};
|
|
816
744
|
}
|
|
817
|
-
return {
|
|
745
|
+
return {
|
|
746
|
+
name,
|
|
747
|
+
isView: Boolean(viewSpec),
|
|
748
|
+
buttonText,
|
|
749
|
+
buttonHint,
|
|
750
|
+
buttonDisplay: buttonInput.display,
|
|
751
|
+
buttonIconClass: buttonInput.iconClass,
|
|
752
|
+
buttonIconContent: buttonInput.iconContent,
|
|
753
|
+
buttonClick,
|
|
754
|
+
buttonIsPrimary: buttonInput.isPrimary || false,
|
|
755
|
+
buttonClass: (_a = buttonInput.class) !== null && _a !== void 0 ? _a : buttonInput.className,
|
|
756
|
+
buttonDidMount: buttonInput.didMount,
|
|
757
|
+
buttonWillUnmount: buttonInput.willUnmount,
|
|
758
|
+
};
|
|
818
759
|
})));
|
|
819
760
|
return { widgets, viewsWithButtons, hasTitle };
|
|
820
761
|
}
|
|
@@ -1031,6 +972,10 @@ function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {
|
|
|
1031
972
|
const changeHandlerPlugin = createPlugin({
|
|
1032
973
|
name: 'change-handler',
|
|
1033
974
|
optionChangeHandlers: {
|
|
975
|
+
controller(controller, context) {
|
|
976
|
+
// TODO: the initial setting is in CalendarDataManager
|
|
977
|
+
controller._setApi(context.calendarApi);
|
|
978
|
+
},
|
|
1034
979
|
events(events, context) {
|
|
1035
980
|
handleEventSources([events], context);
|
|
1036
981
|
},
|
|
@@ -1162,14 +1107,14 @@ function buildTitle(dateProfile, viewOptions, dateEnv) {
|
|
|
1162
1107
|
else { // for day units or smaller, use the actual day range
|
|
1163
1108
|
range = dateProfile.activeRange;
|
|
1164
1109
|
}
|
|
1165
|
-
return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {
|
|
1110
|
+
return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile, dateEnv)), {
|
|
1166
1111
|
isEndExclusive: dateProfile.isRangeAllDay,
|
|
1167
1112
|
defaultSeparator: viewOptions.titleRangeSeparator,
|
|
1168
1113
|
});
|
|
1169
1114
|
}
|
|
1170
1115
|
// Generates the format string that should be used to generate the title for the current date range.
|
|
1171
1116
|
// Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.
|
|
1172
|
-
function buildTitleFormat(dateProfile) {
|
|
1117
|
+
function buildTitleFormat(dateProfile, dateEnv) {
|
|
1173
1118
|
let { currentRangeUnit } = dateProfile;
|
|
1174
1119
|
if (currentRangeUnit === 'year') {
|
|
1175
1120
|
return { year: 'numeric' };
|
|
@@ -1179,8 +1124,12 @@ function buildTitleFormat(dateProfile) {
|
|
|
1179
1124
|
}
|
|
1180
1125
|
let days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);
|
|
1181
1126
|
if (days !== null && days > 1) {
|
|
1182
|
-
|
|
1183
|
-
|
|
1127
|
+
return {
|
|
1128
|
+
year: 'numeric',
|
|
1129
|
+
month: dateEnv.getMonth(dateProfile.activeRange.start) !== dateEnv.getMonth(dateProfile.activeRange.end)
|
|
1130
|
+
? 'short' // different months? do "Sep - Oct 2014"
|
|
1131
|
+
: 'long', // same month? do "September 2014"
|
|
1132
|
+
};
|
|
1184
1133
|
}
|
|
1185
1134
|
// one day. longer, like "September 9 2014"
|
|
1186
1135
|
return { year: 'numeric', month: 'long', day: 'numeric' };
|
|
@@ -1195,13 +1144,12 @@ class CalendarDataManager {
|
|
|
1195
1144
|
this.buildLocale = memoize(buildLocale);
|
|
1196
1145
|
this.buildPluginHooks = buildBuildPluginHooks();
|
|
1197
1146
|
this.buildDateEnv = memoize(buildDateEnv$1);
|
|
1198
|
-
this.buildTheme = memoize(buildTheme);
|
|
1199
1147
|
this.parseToolbars = memoize(parseToolbars);
|
|
1200
1148
|
this.buildViewSpecs = memoize(buildViewSpecs);
|
|
1201
1149
|
this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);
|
|
1202
1150
|
this.buildViewApi = memoize(buildViewApi);
|
|
1203
1151
|
this.buildViewUiProps = memoizeObjArg(buildViewUiProps);
|
|
1204
|
-
this.buildEventUiBySource = memoize(buildEventUiBySource,
|
|
1152
|
+
this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqualShallow);
|
|
1205
1153
|
this.buildEventUiBases = memoize(buildEventUiBases);
|
|
1206
1154
|
this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);
|
|
1207
1155
|
this.buildTitle = memoize(buildTitle);
|
|
@@ -1222,13 +1170,19 @@ class CalendarDataManager {
|
|
|
1222
1170
|
this.actionRunner.pause();
|
|
1223
1171
|
let dynamicOptionOverrides = {};
|
|
1224
1172
|
let optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi);
|
|
1225
|
-
let currentViewType = optionsData.calendarOptions.initialView ||
|
|
1173
|
+
let currentViewType = optionsData.calendarOptions.initialView ||
|
|
1174
|
+
optionsData.pluginHooks.initialView;
|
|
1226
1175
|
let currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides);
|
|
1227
1176
|
// wire things up
|
|
1228
1177
|
// TODO: not DRY
|
|
1229
1178
|
props.calendarApi.currentDataManager = this;
|
|
1230
1179
|
this.emitter.setThisContext(props.calendarApi);
|
|
1231
1180
|
this.emitter.setOptions(currentViewData.options);
|
|
1181
|
+
// NOTE: subsequent updates detected by options-change-handlers.ts
|
|
1182
|
+
const controllerOption = optionsData.calendarOptions.controller;
|
|
1183
|
+
if (controllerOption) {
|
|
1184
|
+
controllerOption._setApi(props.calendarApi);
|
|
1185
|
+
}
|
|
1232
1186
|
let currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);
|
|
1233
1187
|
let dateProfile = currentViewData.dateProfileGenerator.build(currentDate);
|
|
1234
1188
|
if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {
|
|
@@ -1370,7 +1324,8 @@ class CalendarDataManager {
|
|
|
1370
1324
|
let oldData = this.data;
|
|
1371
1325
|
let optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi);
|
|
1372
1326
|
let currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides);
|
|
1373
|
-
let
|
|
1327
|
+
let viewTitle = this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv);
|
|
1328
|
+
let data = this.data = Object.assign(Object.assign(Object.assign({ viewTitle, calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state);
|
|
1374
1329
|
let changeHandlers = optionsData.pluginHooks.optionChangeHandlers;
|
|
1375
1330
|
let oldCalendarOptions = oldData && oldData.calendarOptions;
|
|
1376
1331
|
let newCalendarOptions = optionsData.calendarOptions;
|
|
@@ -1400,18 +1355,15 @@ class CalendarDataManager {
|
|
|
1400
1355
|
dynamicOptionOverrides === this.stableDynamicOptionOverrides) {
|
|
1401
1356
|
return this.stableCalendarOptionsData;
|
|
1402
1357
|
}
|
|
1403
|
-
let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData,
|
|
1404
|
-
|
|
1405
|
-
let
|
|
1406
|
-
let
|
|
1407
|
-
let theme = this.buildTheme(refinedOptions, pluginHooks);
|
|
1408
|
-
let toolbarConfig = this.parseToolbars(refinedOptions, this.stableOptionOverrides, theme, viewSpecs, calendarApi);
|
|
1358
|
+
let { refinedOptions, pluginHooks, localeDefaults, availableLocaleData, } = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides);
|
|
1359
|
+
let dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, refinedOptions.weekTextShort, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator);
|
|
1360
|
+
let viewSpecs = this.buildViewSpecs(pluginHooks.views, this.stableOptionOverrides, this.stableDynamicOptionOverrides);
|
|
1361
|
+
let toolbarConfig = this.parseToolbars(refinedOptions, viewSpecs, calendarApi);
|
|
1409
1362
|
return this.stableCalendarOptionsData = {
|
|
1410
1363
|
calendarOptions: refinedOptions,
|
|
1411
1364
|
pluginHooks,
|
|
1412
1365
|
dateEnv,
|
|
1413
1366
|
viewSpecs,
|
|
1414
|
-
theme,
|
|
1415
1367
|
toolbarConfig,
|
|
1416
1368
|
localeDefaults,
|
|
1417
1369
|
availableRawLocales: availableLocaleData.map,
|
|
@@ -1419,23 +1371,13 @@ class CalendarDataManager {
|
|
|
1419
1371
|
}
|
|
1420
1372
|
// always called from behind a memoizer
|
|
1421
1373
|
processRawCalendarOptions(optionOverrides, dynamicOptionOverrides) {
|
|
1422
|
-
let { locales, locale } =
|
|
1423
|
-
BASE_OPTION_DEFAULTS,
|
|
1424
|
-
optionOverrides,
|
|
1425
|
-
dynamicOptionOverrides,
|
|
1426
|
-
]);
|
|
1374
|
+
let { locales, locale } = mergeCalendarOptions(BASE_OPTION_DEFAULTS, optionOverrides, dynamicOptionOverrides);
|
|
1427
1375
|
let availableLocaleData = this.organizeRawLocales(locales);
|
|
1428
1376
|
let availableRawLocales = availableLocaleData.map;
|
|
1429
1377
|
let localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;
|
|
1430
1378
|
let pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);
|
|
1431
|
-
let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS),
|
|
1432
|
-
let
|
|
1433
|
-
let raw = mergeRawOptions([
|
|
1434
|
-
BASE_OPTION_DEFAULTS,
|
|
1435
|
-
localeDefaults,
|
|
1436
|
-
optionOverrides,
|
|
1437
|
-
dynamicOptionOverrides,
|
|
1438
|
-
]);
|
|
1379
|
+
let refiners = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_ONLY_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
|
|
1380
|
+
let raw = mergeCalendarOptions(BASE_OPTION_DEFAULTS, ...pluginHooks.optionDefaults, localeDefaults, filterKnownOptions(mergeCalendarOptions(optionOverrides, dynamicOptionOverrides), refiners));
|
|
1439
1381
|
let refined = {};
|
|
1440
1382
|
let currentRaw = this.currentCalendarOptionsInput;
|
|
1441
1383
|
let currentRefined = this.currentCalendarOptionsRefined;
|
|
@@ -1443,16 +1385,17 @@ class CalendarDataManager {
|
|
|
1443
1385
|
for (let optionName in raw) {
|
|
1444
1386
|
if (this.optionsForRefining.indexOf(optionName) === -1 && (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1445
1387
|
(optionName in currentRaw) &&
|
|
1446
|
-
COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName]))
|
|
1388
|
+
COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])) || (
|
|
1389
|
+
// see options-manip
|
|
1390
|
+
currentRaw[optionName] && currentRaw[optionName].parts &&
|
|
1391
|
+
raw[optionName] && raw[optionName].parts &&
|
|
1392
|
+
isArraysEqual(currentRaw[optionName].parts, raw[optionName].parts)))) {
|
|
1447
1393
|
refined[optionName] = currentRefined[optionName];
|
|
1448
1394
|
}
|
|
1449
1395
|
else if (refiners[optionName]) {
|
|
1450
1396
|
refined[optionName] = refiners[optionName](raw[optionName]);
|
|
1451
1397
|
anyChanges = true;
|
|
1452
1398
|
}
|
|
1453
|
-
else {
|
|
1454
|
-
extra[optionName] = currentRaw[optionName];
|
|
1455
|
-
}
|
|
1456
1399
|
}
|
|
1457
1400
|
if (anyChanges) {
|
|
1458
1401
|
this.currentCalendarOptionsInput = raw;
|
|
@@ -1468,7 +1411,6 @@ class CalendarDataManager {
|
|
|
1468
1411
|
pluginHooks,
|
|
1469
1412
|
availableLocaleData,
|
|
1470
1413
|
localeDefaults,
|
|
1471
|
-
extra,
|
|
1472
1414
|
};
|
|
1473
1415
|
}
|
|
1474
1416
|
_computeCurrentViewData(viewType, optionsData, optionOverrides, dynamicOptionOverrides) {
|
|
@@ -1476,8 +1418,7 @@ class CalendarDataManager {
|
|
|
1476
1418
|
if (!viewSpec) {
|
|
1477
1419
|
throw new Error(`viewType "${viewType}" is not available. Please make sure you've loaded all neccessary plugins`);
|
|
1478
1420
|
}
|
|
1479
|
-
let { refinedOptions
|
|
1480
|
-
warnUnknownOptions(extra);
|
|
1421
|
+
let { refinedOptions } = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides);
|
|
1481
1422
|
let dateProfileGenerator = this.buildDateProfileGenerator({
|
|
1482
1423
|
dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass,
|
|
1483
1424
|
duration: viewSpec.duration,
|
|
@@ -1502,24 +1443,19 @@ class CalendarDataManager {
|
|
|
1502
1443
|
return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi };
|
|
1503
1444
|
}
|
|
1504
1445
|
processRawViewOptions(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {
|
|
1505
|
-
let
|
|
1506
|
-
|
|
1507
|
-
viewSpec.optionDefaults,
|
|
1508
|
-
localeDefaults,
|
|
1509
|
-
optionOverrides,
|
|
1510
|
-
viewSpec.optionOverrides,
|
|
1511
|
-
dynamicOptionOverrides,
|
|
1512
|
-
]);
|
|
1513
|
-
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);
|
|
1446
|
+
let refiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_ONLY_OPTION_REFINERS), VIEW_ONLY_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);
|
|
1447
|
+
let raw = mergeCalendarOptions(BASE_OPTION_DEFAULTS, ...pluginHooks.optionDefaults, viewSpec.optionDefaults, localeDefaults, filterKnownOptions(mergeCalendarOptions(optionOverrides, viewSpec.optionOverrides, dynamicOptionOverrides), refiners));
|
|
1514
1448
|
let refined = {};
|
|
1515
1449
|
let currentRaw = this.currentViewOptionsInput;
|
|
1516
1450
|
let currentRefined = this.currentViewOptionsRefined;
|
|
1517
1451
|
let anyChanges = false;
|
|
1518
|
-
let extra = {};
|
|
1519
1452
|
for (let optionName in raw) {
|
|
1520
|
-
if (raw[optionName] === currentRaw[optionName] ||
|
|
1521
|
-
|
|
1522
|
-
|
|
1453
|
+
if (raw[optionName] === currentRaw[optionName] || (COMPLEX_OPTION_COMPARATORS[optionName] &&
|
|
1454
|
+
COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName])) || (
|
|
1455
|
+
// see options-manip
|
|
1456
|
+
currentRaw[optionName] && currentRaw[optionName].parts &&
|
|
1457
|
+
raw[optionName] && raw[optionName].parts &&
|
|
1458
|
+
isArraysEqual(currentRaw[optionName].parts, raw[optionName].parts))) {
|
|
1523
1459
|
refined[optionName] = currentRefined[optionName];
|
|
1524
1460
|
}
|
|
1525
1461
|
else {
|
|
@@ -1533,9 +1469,6 @@ class CalendarDataManager {
|
|
|
1533
1469
|
else if (refiners[optionName]) {
|
|
1534
1470
|
refined[optionName] = refiners[optionName](raw[optionName]);
|
|
1535
1471
|
}
|
|
1536
|
-
else {
|
|
1537
|
-
extra[optionName] = raw[optionName];
|
|
1538
|
-
}
|
|
1539
1472
|
anyChanges = true;
|
|
1540
1473
|
}
|
|
1541
1474
|
}
|
|
@@ -1546,11 +1479,10 @@ class CalendarDataManager {
|
|
|
1546
1479
|
return {
|
|
1547
1480
|
rawOptions: this.currentViewOptionsInput,
|
|
1548
1481
|
refinedOptions: this.currentViewOptionsRefined,
|
|
1549
|
-
extra,
|
|
1550
1482
|
};
|
|
1551
1483
|
}
|
|
1552
1484
|
}
|
|
1553
|
-
function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) {
|
|
1485
|
+
function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, weekTextShort, pluginHooks, availableLocaleData, defaultSeparator) {
|
|
1554
1486
|
let locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);
|
|
1555
1487
|
return new DateEnv({
|
|
1556
1488
|
calendarSystem: 'gregory',
|
|
@@ -1560,14 +1492,11 @@ function buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDa
|
|
|
1560
1492
|
weekNumberCalculation,
|
|
1561
1493
|
firstDay,
|
|
1562
1494
|
weekText,
|
|
1495
|
+
weekTextShort,
|
|
1563
1496
|
cmdFormatter: pluginHooks.cmdFormatter,
|
|
1564
1497
|
defaultSeparator,
|
|
1565
1498
|
});
|
|
1566
1499
|
}
|
|
1567
|
-
function buildTheme(options, pluginHooks) {
|
|
1568
|
-
let ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme;
|
|
1569
|
-
return new ThemeClass(options);
|
|
1570
|
-
}
|
|
1571
1500
|
function buildDateProfileGenerator(props) {
|
|
1572
1501
|
let DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;
|
|
1573
1502
|
return new DateProfileGeneratorClass(props);
|
|
@@ -1578,8 +1507,13 @@ function buildViewApi(type, getCurrentData, dateEnv) {
|
|
|
1578
1507
|
function buildEventUiBySource(eventSources) {
|
|
1579
1508
|
return mapHash(eventSources, (eventSource) => eventSource.ui);
|
|
1580
1509
|
}
|
|
1510
|
+
/*
|
|
1511
|
+
The result of this is processed by compileEventUi
|
|
1512
|
+
*/
|
|
1581
1513
|
function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
|
|
1582
|
-
let eventUiBases = {
|
|
1514
|
+
let eventUiBases = {
|
|
1515
|
+
'': eventUiSingleBase, // fallback
|
|
1516
|
+
};
|
|
1583
1517
|
for (let defId in eventDefs) {
|
|
1584
1518
|
let def = eventDefs[defId];
|
|
1585
1519
|
if (def.sourceId && eventUiBySource[def.sourceId]) {
|
|
@@ -1589,7 +1523,7 @@ function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {
|
|
|
1589
1523
|
return eventUiBases;
|
|
1590
1524
|
}
|
|
1591
1525
|
function buildViewUiProps(calendarContext) {
|
|
1592
|
-
|
|
1526
|
+
const { options } = calendarContext;
|
|
1593
1527
|
return {
|
|
1594
1528
|
eventUiSingleBase: createEventUi({
|
|
1595
1529
|
display: options.eventDisplay,
|
|
@@ -1599,11 +1533,9 @@ function buildViewUiProps(calendarContext) {
|
|
|
1599
1533
|
constraint: options.eventConstraint,
|
|
1600
1534
|
overlap: typeof options.eventOverlap === 'boolean' ? options.eventOverlap : undefined,
|
|
1601
1535
|
allow: options.eventAllow,
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
color: options.eventColor,
|
|
1606
|
-
// classNames: options.eventClassNames // render hook will handle this
|
|
1536
|
+
// color: options.eventColor, // StandardEvent/BgEvent will handle this
|
|
1537
|
+
// contrastColor: options.eventContrastColor, // StandardEvent/BgEvent will handle this
|
|
1538
|
+
// className: options.eventClass // render hook will handle this
|
|
1607
1539
|
}, calendarContext),
|
|
1608
1540
|
selectionConfig: createEventUi({
|
|
1609
1541
|
constraint: options.selectConstraint,
|
|
@@ -1623,74 +1555,14 @@ function computeIsLoading(state, context) {
|
|
|
1623
1555
|
function parseContextBusinessHours(calendarContext) {
|
|
1624
1556
|
return parseBusinessHours(calendarContext.options.businessHours, calendarContext);
|
|
1625
1557
|
}
|
|
1626
|
-
function
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
class ToolbarSection extends BaseComponent {
|
|
1634
|
-
render() {
|
|
1635
|
-
let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
|
|
1636
|
-
return createElement('div', {
|
|
1637
|
-
className: 'fc-toolbar-section fc-toolbar-' + this.props.name
|
|
1638
|
-
}, ...children);
|
|
1639
|
-
}
|
|
1640
|
-
renderWidgetGroup(widgetGroup) {
|
|
1641
|
-
let { props, context } = this;
|
|
1642
|
-
let { options, theme } = context;
|
|
1643
|
-
let children = [];
|
|
1644
|
-
let isOnlyButtons = true;
|
|
1645
|
-
let isOnlyView = true;
|
|
1646
|
-
for (const widget of widgetGroup) {
|
|
1647
|
-
const { buttonName, isView } = widget;
|
|
1648
|
-
if (buttonName === 'title') {
|
|
1649
|
-
isOnlyButtons = false;
|
|
1650
|
-
}
|
|
1651
|
-
else if (!isView) {
|
|
1652
|
-
isOnlyView = false;
|
|
1653
|
-
}
|
|
1558
|
+
function filterKnownOptions(options, optionRefiners) {
|
|
1559
|
+
const knownOptions = {};
|
|
1560
|
+
for (const optionName in options) {
|
|
1561
|
+
if (optionRefiners[optionName]) {
|
|
1562
|
+
knownOptions[optionName] = options[optionName];
|
|
1654
1563
|
}
|
|
1655
|
-
for (let widget of widgetGroup) {
|
|
1656
|
-
let { buttonName, buttonClick, buttonText, buttonIcon, buttonHint } = widget;
|
|
1657
|
-
if (buttonName === 'title') {
|
|
1658
|
-
children.push(createElement("div", { role: 'heading', "aria-level": options.headingLevel, id: props.titleId, className: 'fc-toolbar-title' }, props.title));
|
|
1659
|
-
}
|
|
1660
|
-
else {
|
|
1661
|
-
let isPressed = buttonName === props.activeButton;
|
|
1662
|
-
let isDisabled = (!props.isTodayEnabled && buttonName === 'today') ||
|
|
1663
|
-
(!props.isPrevEnabled && buttonName === 'prev') ||
|
|
1664
|
-
(!props.isNextEnabled && buttonName === 'next');
|
|
1665
|
-
children.push(createElement("button", Object.assign({ type: "button", disabled: isDisabled }, ((isOnlyButtons && isOnlyView)
|
|
1666
|
-
? { 'role': 'tab', 'aria-selected': isPressed }
|
|
1667
|
-
: { 'aria-pressed': isPressed }), { "aria-label": typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, className: joinClassNames(`fc-${buttonName}-button`, theme.getClassName('button'), isPressed && theme.getClassName('buttonActive')), onClick: buttonClick }), buttonText || (buttonIcon ? createElement("span", { className: buttonIcon, "aria-hidden": true }) : '')));
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
if (children.length > 1) {
|
|
1671
|
-
return createElement('div', {
|
|
1672
|
-
role: (isOnlyButtons && isOnlyView) ? 'tablist' : undefined,
|
|
1673
|
-
'aria-label': (isOnlyButtons && isOnlyView) ? options.viewChangeHint : undefined,
|
|
1674
|
-
className: isOnlyButtons ? theme.getClassName('buttonGroup') : undefined,
|
|
1675
|
-
}, ...children);
|
|
1676
|
-
}
|
|
1677
|
-
return children[0];
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
class Toolbar extends BaseComponent {
|
|
1682
|
-
render() {
|
|
1683
|
-
let { model, className } = this.props;
|
|
1684
|
-
let { sectionWidgets } = model;
|
|
1685
|
-
return (createElement("div", { className: joinClassNames(className, 'fc-toolbar') },
|
|
1686
|
-
this.renderSection('start', sectionWidgets.start),
|
|
1687
|
-
this.renderSection('center', sectionWidgets.center),
|
|
1688
|
-
this.renderSection('end', sectionWidgets.end)));
|
|
1689
|
-
}
|
|
1690
|
-
renderSection(key, widgetGroups) {
|
|
1691
|
-
let { props } = this;
|
|
1692
|
-
return (createElement(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, titleId: props.titleId, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
|
|
1693
1564
|
}
|
|
1565
|
+
return knownOptions;
|
|
1694
1566
|
}
|
|
1695
1567
|
|
|
1696
1568
|
/*
|
|
@@ -1713,7 +1585,7 @@ class EventClicking extends Interaction {
|
|
|
1713
1585
|
});
|
|
1714
1586
|
}
|
|
1715
1587
|
};
|
|
1716
|
-
this.destroy = listenBySelector(settings.el, 'click',
|
|
1588
|
+
this.destroy = listenBySelector(settings.el, 'click', `.${classNames.internalEvent}`, // on both fg and bg events
|
|
1717
1589
|
this.handleSegClick);
|
|
1718
1590
|
}
|
|
1719
1591
|
}
|
|
@@ -1743,7 +1615,7 @@ class EventHovering extends Interaction {
|
|
|
1743
1615
|
this.triggerEvent('eventMouseLeave', ev, segEl);
|
|
1744
1616
|
}
|
|
1745
1617
|
};
|
|
1746
|
-
this.removeHoverListeners = listenToHoverBySelector(settings.el,
|
|
1618
|
+
this.removeHoverListeners = listenToHoverBySelector(settings.el, `.${classNames.internalEvent}`, // on both fg and bg events
|
|
1747
1619
|
this.handleSegEnter, this.handleSegLeave);
|
|
1748
1620
|
}
|
|
1749
1621
|
destroy() {
|
|
@@ -1764,20 +1636,123 @@ class EventHovering extends Interaction {
|
|
|
1764
1636
|
}
|
|
1765
1637
|
}
|
|
1766
1638
|
|
|
1767
|
-
class
|
|
1639
|
+
class ButtonIcon extends BaseComponent {
|
|
1640
|
+
render() {
|
|
1641
|
+
const { contentGenerator, className } = this.props;
|
|
1642
|
+
if (contentGenerator) {
|
|
1643
|
+
// TODO: somehow give className to the svg?
|
|
1644
|
+
return (createElement(ContentContainer, { tag: 'span', style: { display: 'contents' }, attrs: { 'aria-hidden': true }, renderProps: {}, generatorName: undefined, customGenerator: contentGenerator }));
|
|
1645
|
+
}
|
|
1646
|
+
if (className !== undefined) {
|
|
1647
|
+
return (createElement("span", { "aria-hidden": true, className: className }));
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
class ToolbarSection extends BaseComponent {
|
|
1653
|
+
render() {
|
|
1654
|
+
let { props } = this;
|
|
1655
|
+
let { options } = this.context;
|
|
1656
|
+
let children = props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
|
|
1657
|
+
return createElement('div', {
|
|
1658
|
+
className: generateClassName(options.toolbarSectionClass, { name: props.name }),
|
|
1659
|
+
}, ...children);
|
|
1660
|
+
}
|
|
1661
|
+
renderWidgetGroup(widgetGroup) {
|
|
1662
|
+
var _a;
|
|
1663
|
+
let { props, context } = this;
|
|
1664
|
+
let { options } = context;
|
|
1665
|
+
let children = [];
|
|
1666
|
+
let isOnlyButtons = true;
|
|
1667
|
+
let isOnlyView = true;
|
|
1668
|
+
for (const widget of widgetGroup) {
|
|
1669
|
+
const { name, isView } = widget;
|
|
1670
|
+
if (name === 'title') {
|
|
1671
|
+
isOnlyButtons = false;
|
|
1672
|
+
}
|
|
1673
|
+
else if (!isView) {
|
|
1674
|
+
isOnlyView = false;
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
for (let widget of widgetGroup) {
|
|
1678
|
+
let { name, customElement, buttonHint } = widget;
|
|
1679
|
+
if (name === 'title') {
|
|
1680
|
+
children.push(createElement("div", { role: 'heading', "aria-level": options.headingLevel, id: props.titleId, className: joinArrayishClassNames(options.toolbarTitleClass) }, props.title));
|
|
1681
|
+
}
|
|
1682
|
+
else if (customElement) {
|
|
1683
|
+
children.push(createElement(ContentContainer, { tag: 'span', style: { display: 'contents' }, renderProps: {}, generatorName: undefined, customGenerator: customElement }));
|
|
1684
|
+
}
|
|
1685
|
+
else {
|
|
1686
|
+
let isSelected = name === props.selectedButton;
|
|
1687
|
+
let isDisabled = (!props.isTodayEnabled && name === 'today') ||
|
|
1688
|
+
(!props.isPrevEnabled && name === 'prev') ||
|
|
1689
|
+
(!props.isNextEnabled && name === 'next');
|
|
1690
|
+
let buttonDisplay = (_a = widget.buttonDisplay) !== null && _a !== void 0 ? _a : options.buttonDisplay;
|
|
1691
|
+
if (buttonDisplay === 'auto') {
|
|
1692
|
+
buttonDisplay = (widget.buttonIconContent || widget.buttonIconClass)
|
|
1693
|
+
? 'icon'
|
|
1694
|
+
: 'text';
|
|
1695
|
+
}
|
|
1696
|
+
let iconNode;
|
|
1697
|
+
if (buttonDisplay !== 'text') {
|
|
1698
|
+
iconNode = (createElement(ButtonIcon, { className: widget.buttonIconClass, contentGenerator: widget.buttonIconContent }));
|
|
1699
|
+
}
|
|
1700
|
+
let inGroup = widgetGroup.length > 1 && isOnlyButtons;
|
|
1701
|
+
let inViewGroup = inGroup && isOnlyView;
|
|
1702
|
+
let renderProps = {
|
|
1703
|
+
name,
|
|
1704
|
+
text: widget.buttonText,
|
|
1705
|
+
isPrimary: widget.buttonIsPrimary,
|
|
1706
|
+
isSelected,
|
|
1707
|
+
isDisabled,
|
|
1708
|
+
isIconOnly: buttonDisplay === 'icon',
|
|
1709
|
+
inGroup,
|
|
1710
|
+
inSelectGroup: inViewGroup,
|
|
1711
|
+
};
|
|
1712
|
+
children.push(createElement(ContentContainer, { tag: 'button', attrs: Object.assign(Object.assign({ type: 'button', disabled: isDisabled }, ((isOnlyButtons && isOnlyView)
|
|
1713
|
+
? { 'role': 'tab', 'aria-selected': isSelected }
|
|
1714
|
+
: { 'aria-pressed': isSelected })), { 'aria-label': typeof buttonHint === 'function'
|
|
1715
|
+
? buttonHint(props.navUnit)
|
|
1716
|
+
: buttonHint, onClick: widget.buttonClick }), className: joinClassNames(generateClassName(options.buttonClass, renderProps), !isDisabled && classNames.cursorPointer, inGroup && joinClassNames(isSelected ? classNames.z1 : classNames.z0, classNames.focusZ2)), renderProps: renderProps, generatorName: undefined, classNameGenerator: widget.buttonClass, didMount: widget.buttonDidMount, willUnmount: widget.buttonWillUnmount }, () => (buttonDisplay === 'text'
|
|
1717
|
+
? widget.buttonText
|
|
1718
|
+
: buttonDisplay === 'icon'
|
|
1719
|
+
? iconNode
|
|
1720
|
+
: buttonDisplay === 'icon-text'
|
|
1721
|
+
? (createElement(Fragment, null,
|
|
1722
|
+
iconNode,
|
|
1723
|
+
widget.buttonText))
|
|
1724
|
+
: (createElement(Fragment, null,
|
|
1725
|
+
widget.buttonText,
|
|
1726
|
+
iconNode)) // text-icon
|
|
1727
|
+
)));
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
if (children.length > 1) {
|
|
1731
|
+
return createElement('div', {
|
|
1732
|
+
role: (isOnlyButtons && isOnlyView) ? 'tablist' : undefined,
|
|
1733
|
+
'aria-label': (isOnlyButtons && isOnlyView) ? options.viewChangeHint : undefined,
|
|
1734
|
+
className: joinClassNames(generateClassName(options.buttonGroupClass, { isSelectGroup: isOnlyView }), classNames.isolate),
|
|
1735
|
+
}, ...children);
|
|
1736
|
+
}
|
|
1737
|
+
return children[0];
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
class Toolbar extends BaseComponent {
|
|
1768
1742
|
render() {
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1743
|
+
let { props } = this;
|
|
1744
|
+
let options = this.context.options;
|
|
1745
|
+
let { sectionWidgets } = props.model;
|
|
1746
|
+
return (createElement("div", { className: joinClassNames(props.className, generateClassName(options.toolbarClass, {
|
|
1747
|
+
borderlessX: props.borderlessX,
|
|
1748
|
+
})) },
|
|
1749
|
+
this.renderSection('start', sectionWidgets.start),
|
|
1750
|
+
this.renderSection('center', sectionWidgets.center),
|
|
1751
|
+
this.renderSection('end', sectionWidgets.end)));
|
|
1752
|
+
}
|
|
1753
|
+
renderSection(key, widgetGroups) {
|
|
1754
|
+
let { props } = this;
|
|
1755
|
+
return (createElement(ToolbarSection, { key: key, name: key, widgetGroups: widgetGroups, title: props.title, titleId: props.titleId, navUnit: props.navUnit, selectedButton: props.selectedButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));
|
|
1781
1756
|
}
|
|
1782
1757
|
}
|
|
1783
1758
|
|
|
@@ -1786,7 +1761,6 @@ class CalendarContent extends PureComponent {
|
|
|
1786
1761
|
super(...arguments);
|
|
1787
1762
|
this.buildViewContext = memoize(buildViewContext);
|
|
1788
1763
|
this.buildViewPropTransformers = memoize(buildViewPropTransformers);
|
|
1789
|
-
this.buildToolbarProps = memoize(buildToolbarProps);
|
|
1790
1764
|
this.interactionsStore = {};
|
|
1791
1765
|
this.viewTitleId = getUniqueDomId();
|
|
1792
1766
|
// Component Registration
|
|
@@ -1820,10 +1794,9 @@ class CalendarContent extends PureComponent {
|
|
|
1820
1794
|
renders INSIDE of an outer div
|
|
1821
1795
|
*/
|
|
1822
1796
|
render() {
|
|
1797
|
+
var _a;
|
|
1823
1798
|
let { props } = this;
|
|
1824
|
-
let { toolbarConfig, options } = props;
|
|
1825
|
-
let toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????
|
|
1826
|
-
props.viewTitle);
|
|
1799
|
+
let { toolbarProps, toolbarConfig, options } = props;
|
|
1827
1800
|
let viewHeight;
|
|
1828
1801
|
let viewHeightLiquid = false;
|
|
1829
1802
|
let viewAspectRatio;
|
|
@@ -1837,13 +1810,19 @@ class CalendarContent extends PureComponent {
|
|
|
1837
1810
|
else {
|
|
1838
1811
|
viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall
|
|
1839
1812
|
}
|
|
1840
|
-
let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.
|
|
1813
|
+
let viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);
|
|
1814
|
+
let borderlessX = (_a = options.borderlessX) !== null && _a !== void 0 ? _a : options.borderless; // TODO: DRY
|
|
1841
1815
|
return (createElement(ViewContextType.Provider, { value: viewContext },
|
|
1842
|
-
toolbarConfig.header && (createElement(Toolbar, Object.assign({ className:
|
|
1843
|
-
createElement(
|
|
1844
|
-
|
|
1816
|
+
toolbarConfig.header && (createElement(Toolbar, Object.assign({ className: generateClassName(options.headerToolbarClass, { borderlessX }), model: toolbarConfig.header, borderlessX: borderlessX, titleId: this.viewTitleId }, toolbarProps))),
|
|
1817
|
+
createElement("div", { className: joinClassNames(classNames.flexCol, classNames.rel, viewHeightLiquid && classNames.liquid), style: {
|
|
1818
|
+
height: viewHeight,
|
|
1819
|
+
paddingBottom: viewAspectRatio != null
|
|
1820
|
+
? `${(1 / viewAspectRatio) * 100}%`
|
|
1821
|
+
: undefined
|
|
1822
|
+
} },
|
|
1823
|
+
this.renderView(joinClassNames((viewHeightLiquid || viewHeight) && classNames.liquid, viewAspectRatio != null && classNames.fill, classNames.internalView), toolbarProps.title),
|
|
1845
1824
|
this.buildAppendContent()),
|
|
1846
|
-
toolbarConfig.footer && (createElement(Toolbar, Object.assign({ className:
|
|
1825
|
+
toolbarConfig.footer && (createElement(Toolbar, Object.assign({ className: generateClassName(options.footerToolbarClass, { borderlessX }), model: toolbarConfig.footer, borderlessX: borderlessX }, toolbarProps)))));
|
|
1847
1826
|
}
|
|
1848
1827
|
componentDidMount() {
|
|
1849
1828
|
let { props } = this;
|
|
@@ -1874,10 +1853,17 @@ class CalendarContent extends PureComponent {
|
|
|
1874
1853
|
let children = props.pluginHooks.viewContainerAppends.map((buildAppendContent) => buildAppendContent(props));
|
|
1875
1854
|
return createElement(Fragment, {}, ...children);
|
|
1876
1855
|
}
|
|
1877
|
-
renderView(
|
|
1878
|
-
|
|
1879
|
-
let {
|
|
1856
|
+
renderView(className, title) {
|
|
1857
|
+
var _a, _b, _c;
|
|
1858
|
+
let { props } = this;
|
|
1859
|
+
let { pluginHooks, viewSpec, toolbarConfig, options } = props;
|
|
1860
|
+
// TODO: DRY
|
|
1861
|
+
let { borderless } = options;
|
|
1862
|
+
let calendarBorderlessX = (_a = options.borderlessX) !== null && _a !== void 0 ? _a : borderless;
|
|
1863
|
+
let calendarBorderlessTop = (_b = options.borderlessTop) !== null && _b !== void 0 ? _b : borderless;
|
|
1864
|
+
let calendarBorderlessBottom = (_c = options.borderlessBottom) !== null && _c !== void 0 ? _c : borderless;
|
|
1880
1865
|
let viewProps = {
|
|
1866
|
+
className,
|
|
1881
1867
|
dateProfile: props.dateProfile,
|
|
1882
1868
|
businessHours: props.businessHours,
|
|
1883
1869
|
eventStore: props.renderableEventStore,
|
|
@@ -1889,6 +1875,10 @@ class CalendarContent extends PureComponent {
|
|
|
1889
1875
|
forPrint: props.forPrint,
|
|
1890
1876
|
labelId: toolbarConfig.header && toolbarConfig.header.hasTitle ? this.viewTitleId : undefined,
|
|
1891
1877
|
labelStr: toolbarConfig.header && toolbarConfig.header.hasTitle ? undefined : title,
|
|
1878
|
+
borderlessX: calendarBorderlessX,
|
|
1879
|
+
borderlessTop: toolbarConfig.header ? false : calendarBorderlessTop,
|
|
1880
|
+
borderlessBottom: toolbarConfig.footer ? false : calendarBorderlessBottom,
|
|
1881
|
+
noEdgeEffects: calendarBorderlessX || calendarBorderlessTop || calendarBorderlessBottom,
|
|
1892
1882
|
};
|
|
1893
1883
|
let transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);
|
|
1894
1884
|
for (let transformer of transformers) {
|
|
@@ -1898,20 +1888,6 @@ class CalendarContent extends PureComponent {
|
|
|
1898
1888
|
return (createElement(ViewComponent, Object.assign({}, viewProps)));
|
|
1899
1889
|
}
|
|
1900
1890
|
}
|
|
1901
|
-
function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
|
|
1902
|
-
// don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid
|
|
1903
|
-
let todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason
|
|
1904
|
-
let prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false);
|
|
1905
|
-
let nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false);
|
|
1906
|
-
return {
|
|
1907
|
-
title,
|
|
1908
|
-
activeButton: viewSpec.type,
|
|
1909
|
-
navUnit: viewSpec.singleUnit,
|
|
1910
|
-
isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
|
|
1911
|
-
isPrevEnabled: prevInfo.isValid,
|
|
1912
|
-
isNextEnabled: nextInfo.isValid,
|
|
1913
|
-
};
|
|
1914
|
-
}
|
|
1915
1891
|
// Plugin
|
|
1916
1892
|
// -----------------------------------------------------------------------------------------------------------------
|
|
1917
1893
|
function buildViewPropTransformers(theClasses) {
|
|
@@ -1924,9 +1900,10 @@ Vanilla JS API
|
|
|
1924
1900
|
class Calendar extends CalendarImpl {
|
|
1925
1901
|
constructor(el, optionOverrides = {}) {
|
|
1926
1902
|
super();
|
|
1903
|
+
this.buildToolbarProps = memoize(buildToolbarProps);
|
|
1927
1904
|
this.isRendering = false;
|
|
1928
1905
|
this.isRendered = false;
|
|
1929
|
-
this.
|
|
1906
|
+
this.currentClassName = '';
|
|
1930
1907
|
this.customContentRenderId = 0;
|
|
1931
1908
|
this.handleAction = (action) => {
|
|
1932
1909
|
// actions we know we want to render immediately
|
|
@@ -1945,22 +1922,25 @@ class Calendar extends CalendarImpl {
|
|
|
1945
1922
|
this.isRendered = true;
|
|
1946
1923
|
let { currentData } = this;
|
|
1947
1924
|
flushSync(() => {
|
|
1948
|
-
render(createElement(CalendarRoot, { options: currentData.calendarOptions,
|
|
1949
|
-
this.
|
|
1925
|
+
render(createElement(CalendarRoot, { options: currentData.calendarOptions, emitter: currentData.emitter }, (isRtl, className, height, forPrint) => {
|
|
1926
|
+
this.setIsRtl(isRtl);
|
|
1927
|
+
this.setClassName(className);
|
|
1950
1928
|
this.setHeight(height);
|
|
1929
|
+
const toolbarProps = this.toolbarProps = this.buildToolbarProps(currentData.viewSpec, currentData.dateProfile, currentData.dateProfileGenerator, currentData.currentDate, getNow(currentData.options.now, currentData.dateEnv), // TODO: use NowTimer????
|
|
1930
|
+
currentData.viewTitle);
|
|
1951
1931
|
return (createElement(RenderId.Provider, { value: this.customContentRenderId },
|
|
1952
|
-
createElement(CalendarContent, Object.assign({ forPrint: forPrint }, currentData))));
|
|
1932
|
+
createElement(CalendarContent, Object.assign({ forPrint: forPrint, toolbarProps: toolbarProps }, currentData))));
|
|
1953
1933
|
}), this.el);
|
|
1954
1934
|
});
|
|
1955
1935
|
}
|
|
1956
1936
|
else if (this.isRendered) {
|
|
1957
1937
|
this.isRendered = false;
|
|
1958
1938
|
render(null, this.el);
|
|
1959
|
-
this.
|
|
1939
|
+
this.setIsRtl(false);
|
|
1940
|
+
this.setClassName('');
|
|
1960
1941
|
this.setHeight('');
|
|
1961
1942
|
}
|
|
1962
1943
|
};
|
|
1963
|
-
ensureElHasStyles(el);
|
|
1964
1944
|
this.el = el;
|
|
1965
1945
|
this.renderRunner = new DelayedRunner(this.handleRenderRequest);
|
|
1966
1946
|
new CalendarDataManager({
|
|
@@ -1989,11 +1969,6 @@ class Calendar extends CalendarImpl {
|
|
|
1989
1969
|
this.renderRunner.request();
|
|
1990
1970
|
}
|
|
1991
1971
|
}
|
|
1992
|
-
updateSize() {
|
|
1993
|
-
flushSync(() => {
|
|
1994
|
-
super.updateSize();
|
|
1995
|
-
});
|
|
1996
|
-
}
|
|
1997
1972
|
batchRendering(func) {
|
|
1998
1973
|
this.renderRunner.pause('batchRendering');
|
|
1999
1974
|
func();
|
|
@@ -2008,21 +1983,170 @@ class Calendar extends CalendarImpl {
|
|
|
2008
1983
|
resetOptions(optionOverrides, changedOptionNames) {
|
|
2009
1984
|
this.currentDataManager.resetOptions(optionOverrides, changedOptionNames);
|
|
2010
1985
|
}
|
|
2011
|
-
|
|
2012
|
-
|
|
1986
|
+
/*
|
|
1987
|
+
TODO: DRY with toolbar-parse.ts and ToolbarSection
|
|
1988
|
+
*/
|
|
1989
|
+
getButtonState() {
|
|
1990
|
+
var _a;
|
|
1991
|
+
const { currentData, toolbarProps } = this;
|
|
1992
|
+
const options = currentData.calendarOptions;
|
|
1993
|
+
const buttonConfigs = options.buttons || {};
|
|
1994
|
+
const viewSpecs = currentData.viewSpecs;
|
|
1995
|
+
const buttonState = {
|
|
1996
|
+
today: {
|
|
1997
|
+
text: options.todayText,
|
|
1998
|
+
hint: options.todayHint,
|
|
1999
|
+
isDisabled: !toolbarProps.isTodayEnabled,
|
|
2000
|
+
},
|
|
2001
|
+
prev: {
|
|
2002
|
+
text: options.prevText,
|
|
2003
|
+
hint: options.prevHint,
|
|
2004
|
+
isDisabled: !toolbarProps.isPrevEnabled,
|
|
2005
|
+
},
|
|
2006
|
+
next: {
|
|
2007
|
+
text: options.nextText,
|
|
2008
|
+
hint: options.nextHint,
|
|
2009
|
+
isDisabled: !toolbarProps.isNextEnabled,
|
|
2010
|
+
},
|
|
2011
|
+
prevYear: {
|
|
2012
|
+
text: options.prevYearText,
|
|
2013
|
+
hint: formatWithOrdinals(options.prevHint, [options.yearText, 'year'], options.prevYearText),
|
|
2014
|
+
isDisabled: false,
|
|
2015
|
+
},
|
|
2016
|
+
nextYear: {
|
|
2017
|
+
text: options.prevYearText,
|
|
2018
|
+
hint: formatWithOrdinals(options.nextHint, [options.yearText, 'year'], options.nextYearText),
|
|
2019
|
+
isDisabled: false,
|
|
2020
|
+
},
|
|
2021
|
+
};
|
|
2022
|
+
for (const viewSpecName in viewSpecs) {
|
|
2023
|
+
const viewSpec = viewSpecs[viewSpecName];
|
|
2024
|
+
const buttonTextKey = viewSpec.optionDefaults.buttonTextKey;
|
|
2025
|
+
const buttonText = ((_a = buttonConfigs[viewSpecName]) === null || _a === void 0 ? void 0 : _a.text) ||
|
|
2026
|
+
(buttonTextKey ? options[buttonTextKey] : '') ||
|
|
2027
|
+
(viewSpec.singleUnit ? options[viewSpec.singleUnit + 'Text'] : '') ||
|
|
2028
|
+
viewSpecName;
|
|
2029
|
+
const buttonHint = formatWithOrdinals(options.viewHint, [buttonText, viewSpecName], // ordinal arguments
|
|
2030
|
+
buttonText);
|
|
2031
|
+
buttonState[viewSpecName] = {
|
|
2032
|
+
text: buttonText,
|
|
2033
|
+
hint: buttonHint,
|
|
2034
|
+
};
|
|
2035
|
+
}
|
|
2036
|
+
return buttonState;
|
|
2037
|
+
}
|
|
2038
|
+
setClassName(className) {
|
|
2039
|
+
if (className !== this.currentClassName) {
|
|
2013
2040
|
let { classList } = this.el;
|
|
2014
|
-
for (let
|
|
2015
|
-
|
|
2041
|
+
for (let singleClassName of this.currentClassName.split(' ')) {
|
|
2042
|
+
if (singleClassName) {
|
|
2043
|
+
classList.remove(singleClassName);
|
|
2044
|
+
}
|
|
2016
2045
|
}
|
|
2017
|
-
for (let
|
|
2018
|
-
|
|
2046
|
+
for (let singleClassName of className.split(' ')) {
|
|
2047
|
+
if (singleClassName) {
|
|
2048
|
+
classList.add(singleClassName);
|
|
2049
|
+
}
|
|
2019
2050
|
}
|
|
2020
|
-
this.
|
|
2051
|
+
this.currentClassName = className;
|
|
2021
2052
|
}
|
|
2022
2053
|
}
|
|
2023
2054
|
setHeight(height) {
|
|
2024
2055
|
applyStyleProp(this.el, 'height', height);
|
|
2025
2056
|
}
|
|
2057
|
+
setIsRtl(isRtl) {
|
|
2058
|
+
if (isRtl) {
|
|
2059
|
+
this.el.dir = 'rtl';
|
|
2060
|
+
}
|
|
2061
|
+
else {
|
|
2062
|
+
this.el.removeAttribute('dir');
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {
|
|
2067
|
+
// don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid
|
|
2068
|
+
let todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason
|
|
2069
|
+
let prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false);
|
|
2070
|
+
let nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false);
|
|
2071
|
+
return {
|
|
2072
|
+
title,
|
|
2073
|
+
selectedButton: viewSpec.type,
|
|
2074
|
+
navUnit: viewSpec.singleUnit,
|
|
2075
|
+
isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),
|
|
2076
|
+
isPrevEnabled: prevInfo.isValid,
|
|
2077
|
+
isNextEnabled: nextInfo.isValid,
|
|
2078
|
+
};
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
const blankButtonState = {
|
|
2082
|
+
text: '', hint: '', isDisabled: false,
|
|
2083
|
+
};
|
|
2084
|
+
class CalendarController {
|
|
2085
|
+
constructor(handleDateChange) {
|
|
2086
|
+
this.handleDateChange = handleDateChange;
|
|
2087
|
+
}
|
|
2088
|
+
today() {
|
|
2089
|
+
var _a;
|
|
2090
|
+
(_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.today();
|
|
2091
|
+
}
|
|
2092
|
+
prev() {
|
|
2093
|
+
var _a;
|
|
2094
|
+
(_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.prev();
|
|
2095
|
+
}
|
|
2096
|
+
next() {
|
|
2097
|
+
var _a;
|
|
2098
|
+
(_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.next();
|
|
2099
|
+
}
|
|
2100
|
+
prevYear() {
|
|
2101
|
+
var _a;
|
|
2102
|
+
(_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.prevYear();
|
|
2103
|
+
}
|
|
2104
|
+
nextYear() {
|
|
2105
|
+
var _a;
|
|
2106
|
+
(_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.nextYear();
|
|
2107
|
+
}
|
|
2108
|
+
gotoDate(zonedDateInput) {
|
|
2109
|
+
var _a;
|
|
2110
|
+
(_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.gotoDate(zonedDateInput);
|
|
2111
|
+
}
|
|
2112
|
+
incrementDate(duration) {
|
|
2113
|
+
var _a;
|
|
2114
|
+
(_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.incrementDate(duration);
|
|
2115
|
+
}
|
|
2116
|
+
changeView(viewType) {
|
|
2117
|
+
var _a;
|
|
2118
|
+
(_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.changeView(viewType);
|
|
2119
|
+
}
|
|
2120
|
+
get view() {
|
|
2121
|
+
var _a;
|
|
2122
|
+
return (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.view;
|
|
2123
|
+
}
|
|
2124
|
+
getDate() {
|
|
2125
|
+
var _a;
|
|
2126
|
+
return (_a = this.calendarApi) === null || _a === void 0 ? void 0 : _a.getDate();
|
|
2127
|
+
}
|
|
2128
|
+
getButtonState() {
|
|
2129
|
+
const { calendarApi } = this;
|
|
2130
|
+
return (calendarApi && calendarApi.getButtonState()) || {
|
|
2131
|
+
today: blankButtonState,
|
|
2132
|
+
prev: blankButtonState,
|
|
2133
|
+
next: blankButtonState,
|
|
2134
|
+
prevYear: blankButtonState,
|
|
2135
|
+
nextYear: blankButtonState,
|
|
2136
|
+
};
|
|
2137
|
+
}
|
|
2138
|
+
_setApi(calendarApi) {
|
|
2139
|
+
if (this.calendarApi !== calendarApi) {
|
|
2140
|
+
if (this.calendarApi) {
|
|
2141
|
+
this.calendarApi.off('datesSet', this.handleDateChange);
|
|
2142
|
+
this.calendarApi = undefined;
|
|
2143
|
+
}
|
|
2144
|
+
if (calendarApi) {
|
|
2145
|
+
this.calendarApi = calendarApi;
|
|
2146
|
+
calendarApi.on('datesSet', this.handleDateChange);
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2026
2150
|
}
|
|
2027
2151
|
|
|
2028
2152
|
function formatDate(dateInput, options = {}) {
|
|
@@ -2034,7 +2158,7 @@ function formatDate(dateInput, options = {}) {
|
|
|
2034
2158
|
}
|
|
2035
2159
|
return dateEnv.format(dateMeta.marker, formatter, {
|
|
2036
2160
|
forcedTzo: dateMeta.forcedTzo,
|
|
2037
|
-
});
|
|
2161
|
+
})[0];
|
|
2038
2162
|
}
|
|
2039
2163
|
function formatRange(startInput, endInput, options) {
|
|
2040
2164
|
let dateEnv = buildDateEnv(typeof options === 'object' && options ? options : {}); // pass in if non-null object
|
|
@@ -2066,6 +2190,6 @@ function sliceEvents(props, allDay) {
|
|
|
2066
2190
|
return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
|
|
2067
2191
|
}
|
|
2068
2192
|
|
|
2069
|
-
const version = '7.0.0-beta.
|
|
2193
|
+
const version = '7.0.0-beta.6';
|
|
2070
2194
|
|
|
2071
|
-
export { Calendar, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
|
|
2195
|
+
export { Calendar, CalendarController, createPlugin, formatDate, formatRange, globalLocales, globalPlugins, sliceEvents, version };
|