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