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